I get a college task , to get recently played song using Spotify API and Python language.
(我要完成一项大学任务,以便使用Spotify API和Python语言获得最近播放的歌曲。)
the problem is i just can get MY recently played song only. (问题是我只能获得我最近播放的歌曲。)
The task is getting other's too. (任务也越来越多。)
This my code so far:
(到目前为止,这是我的代码:)
import requests
response =requests.get("https://api.spotify.com/v1/me/player/recently-played",
headers={"Content-Type":"application/json",
"Authorization":"Bearer TOKEN"})
json_response = response.json()
for i in json_response['items']:
print(i["track"]['name'])
ask by Hjin translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…