summaryrefslogtreecommitdiff
path: root/searx/engines/google_images.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-20 21:40:14 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-20 21:40:14 +0200
commit7ce7aaed3de51164e6855c18ffcd3a9c2a90f318 (patch)
treea76b659aa2727f13d571c80367deaa45a709769d /searx/engines/google_images.py
parente1768ed292ebe08eab37536abe89440a4eec5845 (diff)
downloadsearxng-7ce7aaed3de51164e6855c18ffcd3a9c2a90f318.tar.gz
searxng-7ce7aaed3de51164e6855c18ffcd3a9c2a90f318.zip
[fix] handling empty resultsets III.
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-xsearx/engines/google_images.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index c1fadb19f..bb7209ca6 100755
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -16,9 +16,9 @@ def response(resp):
global base_url
results = []
search_res = loads(resp.text)
- if 'responseData' not in search_res:
+ if not search_res.get('responseData'):
return []
- if 'results' not in search_res['responseData'] and search_res['responseData']['results']:
+ if not search_res['responseData'].get('results'):
return []
for result in search_res['responseData']['results']:
url = result['originalContextUrl']