1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00

Merge pull request #1382 from dalf/fix_searxng_extra_update

fix searxng_extra/update/update*.py scripts
This commit is contained in:
Markus Heiser 2022-07-02 12:33:07 +02:00 committed by GitHub
commit 69a6d994e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 634 additions and 179 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -19,10 +19,11 @@ import json
from os.path import join
from searx import searx_dir
from searx.locales import LOCALE_NAMES
from searx.locales import LOCALE_NAMES, locales_initialize
from searx.engines import wikidata, set_loggers
set_loggers(wikidata, 'wikidata')
locales_initialize()
# ORDER BY (with all the query fields) is important to keep a deterministic result order
# so multiple invokation of this script doesn't change currencies.json

View File

@ -22,13 +22,14 @@ from langdetect.lang_detect_exception import LangDetectException
from searx.engines import wikidata, set_loggers
from searx.utils import extract_text, match_language
from searx.locales import LOCALE_NAMES
from searx.locales import LOCALE_NAMES, locales_initialize
from searx import searx_dir
from searx.utils import gen_useragent
import searx.search
import searx.network
set_loggers(wikidata, 'wikidata')
locales_initialize()
SPARQL_WIKIPEDIA_ARTICLE = """
SELECT DISTINCT ?item ?name