mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
[fix] engine - google images error when no results
This commit is contained in:
parent
f0df53673e
commit
b729542a66
@ -95,7 +95,7 @@ def response(resp):
|
|||||||
json_start = resp.text.find('{"ischj":')
|
json_start = resp.text.find('{"ischj":')
|
||||||
json_data = loads(resp.text[json_start:])
|
json_data = loads(resp.text[json_start:])
|
||||||
|
|
||||||
for item in json_data["ischj"]["metadata"]:
|
for item in json_data["ischj"].get("metadata", []):
|
||||||
|
|
||||||
result_item = {
|
result_item = {
|
||||||
'url': item["result"]["referrer_url"],
|
'url': item["result"]["referrer_url"],
|
||||||
|
Loading…
Reference in New Issue
Block a user