summaryrefslogtreecommitdiff
path: root/searx/engines/duckduckgo_definitions.py
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2023-08-11 11:38:09 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-08-18 19:07:14 +0200
commit5ec7df34808d0fe9f057347116b3abf463e5fa6d (patch)
tree672244726103b31b4d0804f11c3ab9a745c53883 /searx/engines/duckduckgo_definitions.py
parent64bc98b5fb74c553578445a9349fd3cd74234fa2 (diff)
downloadsearxng-5ec7df34808d0fe9f057347116b3abf463e5fa6d.tar.gz
searxng-5ec7df34808d0fe9f057347116b3abf463e5fa6d.zip
[mod] engine duckduckgo definitions: support for answer source
Diffstat (limited to 'searx/engines/duckduckgo_definitions.py')
-rw-r--r--searx/engines/duckduckgo_definitions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py
index 39fed87e7..49f9dee34 100644
--- a/searx/engines/duckduckgo_definitions.py
+++ b/searx/engines/duckduckgo_definitions.py
@@ -102,7 +102,7 @@ def response(resp):
if answer:
logger.debug('AnswerType="%s" Answer="%s"', search_res.get('AnswerType'), answer)
if search_res.get('AnswerType') not in ['calc', 'ip']:
- results.append({'answer': html_to_text(answer)})
+ results.append({'answer': html_to_text(answer), 'url': search_res.get('AbstractURL', '')})
# add infobox
if 'Definition' in search_res: