mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
13 lines
276 B
Python
13 lines
276 B
Python
|
# shows tracks for the given artist
|
||
|
|
||
|
import spotipy
|
||
|
import sys
|
||
|
sp = spotipy.Spotify()
|
||
|
|
||
|
if len(sys.argv) > 1:
|
||
|
artist_name = ' '.join(sys.argv[1:])
|
||
|
tracks = sp.search(q=artist_name, limit=20)
|
||
|
for i, t in enumerate(tracks['tracks']):
|
||
|
print ' ', i, t['name']
|
||
|
|