summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Schwiderski <lucas@lschwiderski.de>2024-09-12 10:10:20 +0200
committerBnyro <bnyro@tutanota.com>2024-09-12 10:47:08 +0200
commitf05566d925772ae38274c0b4b1b4ea6d4c1733ee (patch)
tree65bef6c4ea38c4e05dc0f63228a1f5d6d57a0d60
parentc45870dd71c54643c1ca17475ef3eac6054eafa3 (diff)
downloadsearxng-f05566d925772ae38274c0b4b1b4ea6d4c1733ee.tar.gz
searxng-f05566d925772ae38274c0b4b1b4ea6d4c1733ee.zip
[fix] json_engine: Fix result fields being mixed up
Fixes #3810.
-rw-r--r--searx/engines/json_engine.py6
1 files changed, 5 insertions, 1 deletions
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),