summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-08-16 13:13:09 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-08-18 19:07:14 +0200
commitc741fc6f00dfbefb7ce0142b42f62b73607c34bc (patch)
tree31ca7bfbf61320d7254b459916596728be6355fd
parente2744520f856603699f6bb489c28f433a803719c (diff)
[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>
-rw-r--r--searx/engines/currency_convert.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.py
index 18ea6cb1..3505bcf7 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