mirror of
https://github.com/c0de-archive/spotipy.git
synced 2025-07-30 14:00:18 +00:00
Added timeout test
This commit is contained in:
14
examples/test_request_timeout.py
Normal file
14
examples/test_request_timeout.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# 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)
|
Reference in New Issue
Block a user