summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjazzzooo <38244149+jazzzooo@users.noreply.github.com>2023-09-21 06:35:22 -0700
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-09-21 16:38:37 +0200
commitb729542a6681c16c906b4035ea836dec4ba3b91c (patch)
tree914c1ab7f4fe534cae499a1f461021443870112e
parentf0df53673e803fdc731a5bd17f2b926e6731c0b8 (diff)
downloadsearxng-b729542a6681c16c906b4035ea836dec4ba3b91c.tar.gz
searxng-b729542a6681c16c906b4035ea836dec4ba3b91c.zip
[fix] engine - google images error when no results
-rw-r--r--searx/engines/google_images.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py
index e6445b1c4..1f9759c96 100644
--- a/searx/engines/google_images.py
+++ b/searx/engines/google_images.py
@@ -95,7 +95,7 @@ def response(resp):
json_start = resp.text.find('{"ischj":')
json_data = loads(resp.text[json_start:])
- for item in json_data["ischj"]["metadata"]:
+ for item in json_data["ischj"].get("metadata", []):
result_item = {
'url': item["result"]["referrer_url"],