Browse Source

bing engine: _fetch_supported_languages: don't use the language code as a country

ref #1029
Alexandre FLAMENT 3 years ago
parent
commit
f00cdb5e51
1 changed files with 1 additions and 3 deletions
  1. 1 3
      searx/engines/bing.py

+ 1 - 3
searx/engines/bing.py

@@ -145,9 +145,7 @@ def _fetch_supported_languages(resp):
         lang, nation = (setlang.split('-', maxsplit=1) + [None,])[:2]  # fmt: skip
         lang, nation = (setlang.split('-', maxsplit=1) + [None,])[:2]  # fmt: skip
         # fmt: on
         # fmt: on
 
 
-        if not nation:
-            nation = lang.upper()
-        tag = lang + '-' + nation
+        tag = lang + '-' + nation if nation else lang
         lang_tags.add(tag)
         lang_tags.add(tag)
 
 
     return list(lang_tags)
     return list(lang_tags)