spotipy/examples/show_track_info.py

15 lines
244 B
Python
Raw Normal View History

2014-04-05 13:12:01 +00:00
# shows track info for a URN or URL
import spotipy
import sys
import pprint
if len(sys.argv) > 1:
urn = sys.argv[1]
else:
urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ'
sp = spotipy.Spotify()
track = sp.track(urn)
pprint.pprint(track)