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