diff options
author | Alexandre Flament <alex@al-f.net> | 2021-02-19 12:52:26 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2021-02-23 16:42:28 +0100 |
commit | 46ca32c3ccbc5d740cffa2aa8ddd06e66f30e772 (patch) | |
tree | 8c0feae9cc2c0ecafa2135648cedf5aab7852ab5 /searx/search | |
parent | 1be6ab2a91786ac4c83cdb08193a8dfae0c1d84f (diff) | |
download | searxng-46ca32c3ccbc5d740cffa2aa8ddd06e66f30e772.tar.gz searxng-46ca32c3ccbc5d740cffa2aa8ddd06e66f30e772.zip |
[mod] update currencies.json and fetch_currencies.py
use a sparql request on wikidata to get the list of currencies.
currencies.json contains the translation for all supported searx languages.
Supersede #993
Diffstat (limited to 'searx/search')
-rw-r--r-- | searx/search/processors/online_currency.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/search/processors/online_currency.py b/searx/search/processors/online_currency.py index 132c10594..0dc3f3b6a 100644 --- a/searx/search/processors/online_currency.py +++ b/searx/search/processors/online_currency.py @@ -20,6 +20,8 @@ def name_to_iso4217(name): global CURRENCIES name = normalize_name(name) currency = CURRENCIES['names'].get(name, [name]) + if isinstance(currency, str): + return currency return currency[0] |