forked from Ponysearch/Ponysearch
[fix] handle empty response
This commit is contained in:
parent
86a378bd01
commit
1e6253ce16
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ def request(query, params):
|
||||||
def response(resp):
|
def response(resp):
|
||||||
results = []
|
results = []
|
||||||
response_data = loads(resp.text)
|
response_data = loads(resp.text)
|
||||||
|
if not response_data:
|
||||||
|
return results
|
||||||
|
|
||||||
for result in response_data['results']:
|
for result in response_data['results']:
|
||||||
url = _get_url(result)
|
url = _get_url(result)
|
||||||
|
|
Loading…
Reference in a new issue