[fix] json_engine: Fix result fields being mixed up

Fixes #3810.
This commit is contained in:
Lucas Schwiderski 2024-09-12 10:10:20 +02:00 committed by Bnyro
parent c45870dd71
commit f05566d925
1 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,11 @@ def response(resp):
} }
) )
else: 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( results.append(
{ {
'url': url_prefix + to_string(url), 'url': url_prefix + to_string(url),