summaryrefslogtreecommitdiff
path: root/searx/search/processors
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-02-19 12:52:26 +0100
committerAlexandre Flament <alex@al-f.net>2021-02-23 16:42:28 +0100
commit46ca32c3ccbc5d740cffa2aa8ddd06e66f30e772 (patch)
tree8c0feae9cc2c0ecafa2135648cedf5aab7852ab5 /searx/search/processors
parent1be6ab2a91786ac4c83cdb08193a8dfae0c1d84f (diff)
[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/processors')
-rw-r--r--searx/search/processors/online_currency.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/search/processors/online_currency.py b/searx/search/processors/online_currency.py
index 132c1059..0dc3f3b6 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]