mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
[mod] engine duckduckgo definitions: support for answer source
This commit is contained in:
parent
64bc98b5fb
commit
5ec7df3480
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user