diff options
author | asciimoo <asciimoo@gmail.com> | 2013-10-20 19:45:13 +0200 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-10-20 19:45:13 +0200 |
commit | 126682a6ce8719f81fc8225578542c437607b2fb (patch) | |
tree | 372bacd9e0a8beef4fe43cd9c0830c6058265daa /searx/engines/google_images.py | |
parent | 1e8af701923d7b7a088e30e32737827ddd597802 (diff) | |
download | searxng-126682a6ce8719f81fc8225578542c437607b2fb.tar.gz searxng-126682a6ce8719f81fc8225578542c437607b2fb.zip |
[fix] handling empty resultset
Diffstat (limited to 'searx/engines/google_images.py')
-rwxr-xr-x | searx/engines/google_images.py | 2 |
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'] |