spotipy/examples/show_artist.py

17 lines
251 B
Python
Raw Normal View History

2014-04-05 13:12:01 +00:00
# shows artist info for a URN or URL
import spotipy
import sys
import pprint
if len(sys.argv) > 1:
urn = sys.argv[1]
else:
urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu'
sp = spotipy.Spotify()
2014-08-20 18:04:29 +00:00
2014-04-05 13:12:01 +00:00
artist = sp.artist(urn)
2014-08-20 18:04:29 +00:00
2014-04-05 13:12:01 +00:00
pprint.pprint(artist)