From d9d9bd720d01176b948c32b653a2c79b752d3d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milien=20Devos?= Date: Sat, 10 Jul 2021 14:09:29 +0000 Subject: [PATCH] Fix google images Proposed fix in https://github.com/searx/searx/pull/2115#issuecomment-876716010 --- searx/engines/google_images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index c17227a6..edfc3df9 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -84,7 +84,7 @@ def scrap_img_by_id(script, data_id): img_url = '' _script = script.split('\n') for i, line in enumerate(_script): - if 'gstatic.com/images' in line and data_id in line: + if 'gstatic.com/images' in line and data_id in line and i + 1 < len(_script): url_line = _script[i + 1] img_url = url_line.split('"')[1] img_url = unquote(img_url.replace(r'\u00', r'%'))