mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
Update show_album.py
Import SpotifyClientCredentials from spotipy.oauth2
This commit is contained in:
parent
bd1a122831
commit
5f45a0a54e
@ -2,6 +2,7 @@
|
|||||||
# shows album info for a URN or URL
|
# shows album info for a URN or URL
|
||||||
|
|
||||||
import spotipy
|
import spotipy
|
||||||
|
from spotipy.oauth2 import SpotifyClientCredentials
|
||||||
import sys
|
import sys
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ else:
|
|||||||
urn = 'spotify:album:5yTx83u3qerZF7GRJu7eFk'
|
urn = 'spotify:album:5yTx83u3qerZF7GRJu7eFk'
|
||||||
|
|
||||||
|
|
||||||
sp = spotipy.Spotify()
|
client_credentials_manager = SpotifyClientCredentials()
|
||||||
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
||||||
album = sp.album(urn)
|
album = sp.album(urn)
|
||||||
pprint.pprint(album)
|
pprint.pprint(album)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user