summaryrefslogtreecommitdiff
path: root/searxng_extra/update/update_currencies.py
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2026-08-14 23:01:19 +0200
committerBnyro <bnyro@tutanota.com>2026-09-01 13:56:11 +0200
commit2b1c88c54c6900a3684a6733b9749e91ecf7de4b (patch)
tree7d03318938e9f0b96bd15aeaa339c452ee1be02d /searxng_extra/update/update_currencies.py
parentd226b78bc4c9ab93a84849b8ad128a68c41be17c (diff)
[refactor] wikidata: cache wikidata properties in searxng data
Diffstat (limited to 'searxng_extra/update/update_currencies.py')
-rwxr-xr-xsearxng_extra/update/update_currencies.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searxng_extra/update/update_currencies.py b/searxng_extra/update/update_currencies.py
index 288f0994e..36e8cfa2e 100755
--- a/searxng_extra/update/update_currencies.py
+++ b/searxng_extra/update/update_currencies.py
@@ -16,6 +16,7 @@ import json
from searx.locales import LOCALE_NAMES, locales_initialize
from searx.engines import wikidata, set_loggers
from searx.data.currencies import CurrenciesDB
+from searx.wikidata import send_wikidata_query
set_loggers(wikidata, 'wikidata')
locales_initialize()
@@ -90,7 +91,7 @@ def add_currency_label(db, label, iso4217, language):
def wikidata_request_result_iterator(request):
- result = wikidata.send_wikidata_query(request.replace('%LANGUAGES_SPARQL%', LANGUAGES_SPARQL), timeout=20)
+ result = send_wikidata_query(request.replace('%LANGUAGES_SPARQL%', LANGUAGES_SPARQL), timeout=20)
if result is not None:
yield from result['results']['bindings']