spotipy/examples/show_user.py

18 lines
246 B
Python
Raw Normal View History

2014-05-16 11:56:59 +00:00
# shows artist info for a URN or URL
import spotipy
import sys
import pprint
if len(sys.argv) > 1:
username = sys.argv[1]
else:
username = 'plamere'
sp = spotipy.Spotify()
sp.trace = True
user = sp.user(username)
pprint.pprint(user)