yes.
This commit is contained in:
parent
0935ee9435
commit
eea1ae87e9
1 changed files with 2 additions and 1 deletions
3
main.py
3
main.py
|
@ -20,7 +20,8 @@ token = util.prompt_for_user_token(username, scope, client_id, client_secret, re
|
||||||
|
|
||||||
if token:
|
if token:
|
||||||
sp = spotipy.Spotify(auth=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'])
|
print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
|
||||||
imageString = requests.get(track['item']['album']['images'][0]['url'])
|
imageString = requests.get(track['item']['album']['images'][0]['url'])
|
||||||
image = Image.open(BytesIO(imageString.content))
|
image = Image.open(BytesIO(imageString.content))
|
||||||
|
|
Loading…
Reference in a new issue