From 8ef0b60ef9e4f7b286bf91a32835e3bdb1613be1 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 16 Aug 2023 13:13:09 +0200 Subject: [PATCH] [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 --- searx/engines/currency_convert.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py index 18ea6cb19..3505bcf76 100644 --- a/searx/engines/currency_convert.py +++ b/searx/engines/currency_convert.py @@ -47,10 +47,7 @@ def response(resp): resp.search_params['to_name'], ) - url = 'https://duckduckgo.com/js/spice/currency/1/{0}/{1}'.format( - resp.search_params['from'].upper(), resp.search_params['to'] - ) - + url = f"https://duckduckgo.com/?q={resp.search_params['from']}+to+{resp.search_params['to']}" results.append({'answer': answer, 'url': url}) return results