summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-08-08 18:26:46 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-10-15 15:20:39 +0200
commitc96ba25f5be748b316faa8725b1b3c8c01d787d1 (patch)
tree1bf1bdd8247163130206f521ef81e224a913d159 /searx
parent2986681b31a60d67e0468affb257a52246220f11 (diff)
downloadsearxng-c96ba25f5be748b316faa8725b1b3c8c01d787d1.tar.gz
searxng-c96ba25f5be748b316faa8725b1b3c8c01d787d1.zip
[fix] online_currency.py: if more alternatives, use the last in the list
If there are more than one ISO 4217 numeric codes [1] for a currency use the last one in the list of alternatives [2]. [1] https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one) [2] https://en.wikipedia.org/wiki/ISO_4217#Historical_codes Closes: https://github.com/searxng/searxng/issues/3713 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx')
-rw-r--r--searx/search/processors/online_currency.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/search/processors/online_currency.py b/searx/search/processors/online_currency.py
index 7d6811e6b..197e0e061 100644
--- a/searx/search/processors/online_currency.py
+++ b/searx/search/processors/online_currency.py
@@ -23,7 +23,7 @@ def name_to_iso4217(name):
currency = CURRENCIES['names'].get(name, [name])
if isinstance(currency, str):
return currency
- return currency[0]
+ return currency[-1]
def iso4217_to_name(iso4217, language):