diff options
| author | Noémi Ványi <kvch@users.noreply.github.com> | 2019-01-07 21:35:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-07 21:35:40 +0100 |
| commit | 2438b3c77a3ad276aaeb15e5a54315d351a42273 (patch) | |
| tree | 00d4783b39625ca01c61aa4f04cb88250b21dffc /searx/engines/wikipedia.py | |
| parent | 491792c1a58f71083f6af663bb6d93e40fa44c9f (diff) | |
| parent | 97351a2c725ce620d452c62da07379130bafdb95 (diff) | |
Merge pull request #1475 from kvch/add-all-language-option-again
Revert "remove 'all' option from search languages"
Diffstat (limited to 'searx/engines/wikipedia.py')
| -rw-r--r-- | searx/engines/wikipedia.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/wikipedia.py b/searx/engines/wikipedia.py index 23f23db4d..4dae735d1 100644 --- a/searx/engines/wikipedia.py +++ b/searx/engines/wikipedia.py @@ -31,6 +31,9 @@ supported_languages_url = 'https://meta.wikimedia.org/wiki/List_of_Wikipedias' # set language in base_url def url_lang(lang): + lang_pre = lang.split('-')[0] + if lang_pre == 'all' or lang_pre not in supported_languages and lang_pre not in language_aliases: + return 'en' return match_language(lang, supported_languages, language_aliases).split('-')[0] |