From 126682a6ce8719f81fc8225578542c437607b2fb Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sun, 20 Oct 2013 19:45:13 +0200 Subject: [PATCH] [fix] handling empty resultset --- searx/engines/google_images.py | 2 ++ 1 file changed, 2 insertions(+) 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']