on master help sign in
[fix] handling empty resultset
commit126682a6ce8719f81fc8225578542c437607b2fb authorasciimoo <asciimoo@gmail.com> dateSun 20 Oct 2013, 19:45 (13 years ago) parent1e8af70
1 file changed+2
searx/engines/google_images.py+2
searx/engines/google_images.py+2
@@ -18,6 +18,8 @@ def response(resp):
1818 search_res = loads(resp.text)
1919 if 'responseData' not in search_res:
2020 return []
21+ if 'results' not in search_res['responseData']:
22+ return []
2123 for result in search_res['responseData']['results']:
2224 url = result['originalContextUrl']
2325 title = result['title']