1
0
Fork 0
mirror of https://github.com/searxng/searxng.git synced 2025-01-13 11:55:26 +00:00

[fix] handle empty response

This commit is contained in:
Adam Tauber 2020-01-02 22:29:55 +01:00
parent 86a378bd01
commit 1e6253ce16

View file

@ -45,6 +45,8 @@ def request(query, params):
def response(resp):
results = []
response_data = loads(resp.text)
if not response_data:
return results
for result in response_data['results']:
url = _get_url(result)