[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
This commit is contained in:
Alexandre Flament 2021-02-19 12:52:26 +01:00
parent 1be6ab2a91
commit 46ca32c3cc
4 changed files with 15044 additions and 7774 deletions

File diff suppressed because it is too large Load diff

View file

@ -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]