summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-20 19:45:13 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-20 19:45:13 +0200
commit126682a6ce8719f81fc8225578542c437607b2fb (patch)
tree372bacd9e0a8beef4fe43cd9c0830c6058265daa /searx/engines/google_images.py
parent1e8af701923d7b7a088e30e32737827ddd597802 (diff)
downloadsearxng-126682a6ce8719f81fc8225578542c437607b2fb.tar.gz
searxng-126682a6ce8719f81fc8225578542c437607b2fb.zip
[fix] handling empty resultset
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-xsearx/engines/google_images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index 7294b8ad2..27632e9b1 100755
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -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']