spotipy/examples/simple2.py

16 lines
342 B
Python
Raw Normal View History

2014-08-22 13:28:19 +00:00
import spotipy
lz_uri = 'spotify:artist:36QJpDe2go2KgaRleHCDTp'
spotify = spotipy.Spotify()
results = spotify.artist_top_tracks(lz_uri)
for track in results['tracks'][:10]:
2015-06-05 09:07:28 +00:00
print('track : ' + track['name'])
print('audio : ' + track['preview_url'])
print('cover art: ' + track['album']['images'][0]['url'])
print()