From b729542a6681c16c906b4035ea836dec4ba3b91c Mon Sep 17 00:00:00 2001 From: jazzzooo <38244149+jazzzooo@users.noreply.github.com> Date: Thu, 21 Sep 2023 06:35:22 -0700 Subject: [PATCH] [fix] engine - google images error when no results --- 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 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"],