Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c741fc6f authored by Markus Heiser's avatar Markus Heiser Committed by Markus Heiser
Browse files

[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: default avatarMarkus Heiser <markus.heiser@darmarit.de>
parent e2744520
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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