mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 17:23:53 +00:00
19 lines
406 B
Python
19 lines
406 B
Python
|
|
# shows artist info for a URN or URL
|
|
|
|
from spotipy.oauth2 import SpotifyClientCredentials
|
|
import spotipy
|
|
import sys
|
|
import pprint
|
|
|
|
if len(sys.argv) > 1:
|
|
username = sys.argv[1]
|
|
else:
|
|
username = 'plamere'
|
|
|
|
client_credentials_manager = SpotifyClientCredentials()
|
|
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
|
|
sp.trace = True
|
|
user = sp.user(username)
|
|
pprint.pprint(user)
|