From 46ca32c3ccbc5d740cffa2aa8ddd06e66f30e772 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 19 Feb 2021 12:52:26 +0100 Subject: [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 --- searx/search/processors/online_currency.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'searx/search') 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] -- cgit v1.2.3