mirror of
https://github.com/searxng/searxng
synced 2024-11-03 09:40:20 +00:00
[mod] currency_convert: support for showing the answer source url
Show URL of the ddg-search page, not the URL of a (generic) Javascript. The latter one is not usefull for the user. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
e2744520f8
commit
c741fc6f00
@ -47,10 +47,7 @@ def response(resp):
|
|||||||
resp.search_params['to_name'],
|
resp.search_params['to_name'],
|
||||||
)
|
)
|
||||||
|
|
||||||
url = 'https://duckduckgo.com/js/spice/currency/1/{0}/{1}'.format(
|
url = f"https://duckduckgo.com/?q={resp.search_params['from']}+to+{resp.search_params['to']}"
|
||||||
resp.search_params['from'].upper(), resp.search_params['to']
|
|
||||||
)
|
|
||||||
|
|
||||||
results.append({'answer': answer, 'url': url})
|
results.append({'answer': answer, 'url': url})
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
Loading…
Reference in New Issue
Block a user