summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2023-10-20 11:26:28 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-12-11 18:57:40 +0100
commitdda74fc9c96d9bf9bcb0b5dac90219e3b31f8390 (patch)
treee60fceba4bbeebc594e43035ec2d78a8a75ed321 /searx/engines
parentb5b81c980653a16fbb86cc43fdba4e61546b8fcc (diff)
[feat] engine: implementation of mdn
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/json_engine.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/engines/json_engine.py b/searx/engines/json_engine.py
index 2dd3bc55e..9bf5f5c28 100644
--- a/searx/engines/json_engine.py
+++ b/searx/engines/json_engine.py
@@ -8,6 +8,7 @@ from searx.utils import to_string, html_to_text
search_url = None
url_query = None
+url_prefix = ""
content_query = None
title_query = None
content_html_to_text = False
@@ -129,7 +130,7 @@ def response(resp):
content = ""
results.append(
{
- 'url': to_string(url),
+ 'url': url_prefix + to_string(url),
'title': title_filter(to_string(title)),
'content': content_filter(to_string(content)),
}
@@ -138,7 +139,7 @@ def response(resp):
for url, title, content in zip(query(json, url_query), query(json, title_query), query(json, content_query)):
results.append(
{
- 'url': to_string(url),
+ 'url': url_prefix + to_string(url),
'title': title_filter(to_string(title)),
'content': content_filter(to_string(content)),
}