diff options
author | Émilien Devos <contact@emiliendevos.be> | 2021-07-10 14:09:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-10 14:09:29 +0000 |
commit | d9d9bd720d01176b948c32b653a2c79b752d3d7b (patch) | |
tree | cc3078e1b41368095bda58d944792fe8d59be371 /searx/engines/google_images.py | |
parent | c72cca69de08c6464ad50f2fab35eb60f2695d39 (diff) | |
download | searxng-d9d9bd720d01176b948c32b653a2c79b752d3d7b.tar.gz searxng-d9d9bd720d01176b948c32b653a2c79b752d3d7b.zip |
Fix google images
Proposed fix in https://github.com/searx/searx/pull/2115#issuecomment-876716010
Diffstat (limited to 'searx/engines/google_images.py')
-rw-r--r-- | searx/engines/google_images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index c17227a64..edfc3df9a 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'%')) |