mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Update show_track_info.py
Import SpotifyClientCredentials from spotipy.oauth2
This commit is contained in:
parent
c3bae42b9e
commit
5a00758609
@ -1,6 +1,7 @@
|
|||||||
# shows track info for a URN or URL
|
# shows track info for a URN or URL
|
||||||
|
|
||||||
import spotipy
|
import spotipy
|
||||||
|
from spotipy.oauth2 import SpotifyClientCredentials
|
||||||
import sys
|
import sys
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
@ -9,6 +10,7 @@ if len(sys.argv) > 1:
|
|||||||
else:
|
else:
|
||||||
urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ'
|
urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ'
|
||||||
|
|
||||||
sp = spotipy.Spotify()
|
client_credentials_manager = SpotifyClientCredentials()
|
||||||
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
||||||
track = sp.track(urn)
|
track = sp.track(urn)
|
||||||
pprint.pprint(track)
|
pprint.pprint(track)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user