mirror of https://github.com/searxng/searxng.git
[fix] handling empty resultset
This commit is contained in:
parent
1e8af70192
commit
126682a6ce
|
@ -18,6 +18,8 @@ def response(resp):
|
|||
search_res = loads(resp.text)
|
||||
if 'responseData' not in search_res:
|
||||
return []
|
||||
if 'results' not in search_res['responseData']:
|
||||
return []
|
||||
for result in search_res['responseData']['results']:
|
||||
url = result['originalContextUrl']
|
||||
title = result['title']
|
||||
|
|
Loading…
Reference in New Issue