From f05566d925772ae38274c0b4b1b4ea6d4c1733ee Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Thu, 12 Sep 2024 10:10:20 +0200 Subject: [PATCH] [fix] json_engine: Fix result fields being mixed up Fixes #3810. --- searx/engines/json_engine.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/searx/engines/json_engine.py b/searx/engines/json_engine.py index 47cf16372..9d919a63d 100644 --- a/searx/engines/json_engine.py +++ b/searx/engines/json_engine.py @@ -146,7 +146,11 @@ def response(resp): } ) else: - for url, title, content in zip(query(json, url_query), query(json, title_query), query(json, content_query)): + for result in json: + url = query(result, url_query)[0] + title = query(result, title_query)[0] + content = query(result, content_query)[0] + results.append( { 'url': url_prefix + to_string(url),