Browse files

Use a more human-friendly format in searx/data/engines_languages.json (


Instead of a single line with 500000 characters use nicely formatted JSON.
Sort the lists in so when updating it is possible to
more easily see the differences (search engines do change the order their
languages are listed in)
  • Loading branch information...
isj-privacore authored and Pofilo committed Nov 29, 2018
1 parent 3ff67c2 commit 0b7f0bde62f19f54105bf34cfca82cccb6e95720
Showing with 27,228 additions and 2 deletions.
  1. +27,225 −1 searx/data/engines_languages.json
  2. +3 −1 utils/

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -27,12 +27,14 @@ def fetch_supported_languages():
if hasattr(engines[engine_name], 'fetch_supported_languages'):
engines_languages[engine_name] = engines[engine_name].fetch_supported_languages()
if type(engines_languages[engine_name]) == list:
engines_languages[engine_name] = sorted(engines_languages[engine_name])
except Exception as e:

# write json file
with, "w", encoding="utf-8") as f:
dump(engines_languages, f, ensure_ascii=False)
dump(engines_languages, f, ensure_ascii=False, indent=4, separators=(',', ': '))

return engines_languages

0 comments on commit 0b7f0bd

Please sign in to comment.