[mod] engine duckduckgo definitions: support for answer source

This commit is contained in:
Bnyro 2023-08-11 11:38:09 +02:00 committed by MatthieuBarbu
parent 2e85382ffe
commit 3dffdf17f7
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ def response(resp):
if answer: if answer:
logger.debug('AnswerType="%s" Answer="%s"', search_res.get('AnswerType'), answer) logger.debug('AnswerType="%s" Answer="%s"', search_res.get('AnswerType'), answer)
if search_res.get('AnswerType') not in ['calc', 'ip']: 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 # add infobox
if 'Definition' in search_res: if 'Definition' in search_res: