This commit is contained in:
Lukas Schulz 2020-12-19 21:52:10 +01:00
parent 0935ee9435
commit eea1ae87e9

View file

@ -20,7 +20,8 @@ token = util.prompt_for_user_token(username, scope, client_id, client_secret, re
if token:
sp = spotipy.Spotify(auth=token)
track = sp.current_user_playing_track()
track = sp.currently_playing()
print(track['is_playing'])
print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
imageString = requests.get(track['item']['album']['images'][0]['url'])
image = Image.open(BytesIO(imageString.content))