这有点奇怪。我尝试了 readthedocs 中的一种方法,但它只是说存在属性错误。
AttributeError: 'Spotify' object has no attribute 'devices'
代码如下:
import spotipy.util as util
import spotipy
(token left out for security reasons)
sp = spotipy.client.Spotify(auth=token)
sp.trace = True
sp.trace_out = True
print(sp.devices())