当我从Spotify's Docs运行这个简单代码时:
import spotipy
birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP'
spotify = spotipy.Spotify()
results = spotify.artist_albums(birdy_uri, album_type='album')
albums = results['items']
while results['next']:
results = spotify.next(results)
albums.extend(results['items'])
for album in albums:
print(album['name'])
我有个例外:
^{pr2}$
您需要使用您的Spotify应用凭据(客户端ID和客户端密码),从www.developer.spotify.com,将其分配给一个变量并将其用作对象。在
更多信息:Client Credential Flow
spotifywebapi最近更新了,需要对各种请求进行授权。在
使用authorized requests可以解决这个问题。在
相关问题 更多 >
编程相关推荐