在他们关于获取艺术家热门曲目的文档中,他们提到了这一点:
\n\n最多 10 首曲目是 Spotify 应用程序显示的曲目。如果您想获取更多艺术家\xe2\x80\x99的热门曲目,另一种方法是使用 Echo Nest 歌曲/搜索来完成此操作。它将接受 Spotify 艺术家 id 作为输入,并在输出中为您提供 Spotify id\xe2\x80\x99s。
\n\n我很确定 Echo Nest Api 已不复存在,所以我想知道是否还有办法获取除 10 首之外的其他艺术家的歌曲?
\n\n或者,如果 Spotify 不再支持该功能,我正在考虑使用 Last.fm 的 Api 来完成此操作,如果有人对如何解决此问题有任何其他建议,那就太棒了!提前致谢。
\n所以我有一个名为 User_1 的父类,User_1 的 init 方法如下所示:
class User_1(object):
def __init__(self, user_id, bio="", likes=0, uploads={}, follows=0, dateJoined=None, accountType=""):
self.user_id = user_id
self.bio = bio
self.likes = likes
self.uploads = uploads
self.follows = follows
self.dateJoined = dateJoined
self.accountType = accountType
self.comments = []
self.responseCommentsCount = 0
Run Code Online (Sandbox Code Playgroud)
然后,我有一个继承自 User_1 类的类,称为 TrendingUsers,它的 init 方法如下所示:
class TrendingUser(User_1):
def __init__(self, user_id):
User_1.__init__(self, user_id)
self.averageTSWords = 0.0
self.averageSSWords = 0.0
self.percOfClipTitlesUntitled = 0.0
self.percOfClipsWithCaptions = 0.0
self.percOfClipsWithTags = 0.0
self.percOfClipsWithComments = 0.0
self.percOfPurgatoryClips = 0.0
self.averageTimeDifferenceBetweenUploaded = …Run Code Online (Sandbox Code Playgroud) api ×1
dictionary ×1
echonest ×1
inheritance ×1
last.fm ×1
python ×1
python-2.7 ×1
rest ×1
spotify ×1