spotipy/examples/test_request_timeout.py

15 lines
261 B
Python
Raw Normal View History

2016-12-31 14:52:03 +00:00
# shows artist info for a URN or URL
import spotipy
import sys
import pprint
if len(sys.argv) > 1:
search_str = sys.argv[1]
else:
search_str = 'Radiohead'
sp = spotipy.Spotify(requests_timeout=.1)
result = sp.search(search_str)
pprint.pprint(result)