mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Update show_artist.py
Import SpotifyClientCredentials from spotipy.oauth2
This commit is contained in:
parent
e3185e22ec
commit
bd1a122831
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user