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