diff options
Diffstat (limited to 'searxng_extra/update/update_engine_descriptions.py')
-rwxr-xr-x | searxng_extra/update/update_engine_descriptions.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/searxng_extra/update/update_engine_descriptions.py b/searxng_extra/update/update_engine_descriptions.py index 301ce798d..fc793ea2f 100755 --- a/searxng_extra/update/update_engine_descriptions.py +++ b/searxng_extra/update/update_engine_descriptions.py @@ -24,6 +24,9 @@ from searx import searx_dir from searx.utils import gen_useragent, detect_language import searx.search import searx.network +from searx.data import data_dir + +DATA_FILE = data_dir / 'engine_descriptions.json' set_loggers(wikidata, 'wikidata') locales_initialize() @@ -362,8 +365,8 @@ def main(): fetch_website_descriptions() output = get_output() - with open(get_engine_descriptions_filename(), 'w', encoding='utf8') as f: - f.write(json.dumps(output, indent=1, separators=(',', ':'), ensure_ascii=False)) + with DATA_FILE.open('w', encoding='utf8') as f: + f.write(json.dumps(output, indent=1, separators=(',', ':'), sort_keys=True, ensure_ascii=False)) if __name__ == "__main__": |