spotipy/examples/show_album.py

17 lines
246 B
Python
Raw Normal View History

2014-04-07 17:10:25 +00:00
# shows album info for a URN or URL
2014-04-07 17:10:25 +00:00
import spotipy
import sys
import pprint
if len(sys.argv) > 1:
urn = sys.argv[1]
else:
urn = 'spotify:album:5yTx83u3qerZF7GRJu7eFk'
2014-04-07 17:10:25 +00:00
sp = spotipy.Spotify()
album = sp.album(urn)
pprint.pprint(album)