summaryrefslogtreecommitdiff
path: root/searx/engines/wikidata.py
diff options
context:
space:
mode:
authorNoémi Ványi <kvch@users.noreply.github.com>2019-01-07 21:35:40 +0100
committerGitHub <noreply@github.com>2019-01-07 21:35:40 +0100
commit2438b3c77a3ad276aaeb15e5a54315d351a42273 (patch)
tree00d4783b39625ca01c61aa4f04cb88250b21dffc /searx/engines/wikidata.py
parent491792c1a58f71083f6af663bb6d93e40fa44c9f (diff)
parent97351a2c725ce620d452c62da07379130bafdb95 (diff)
Merge pull request #1475 from kvch/add-all-language-option-again
Revert "remove 'all' option from search languages"
Diffstat (limited to 'searx/engines/wikidata.py')
-rw-r--r--searx/engines/wikidata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py
index 2485b6528..03a58a31a 100644
--- a/searx/engines/wikidata.py
+++ b/searx/engines/wikidata.py
@@ -68,7 +68,10 @@ def response(resp):
html = fromstring(resp.text)
search_results = html.xpath(wikidata_ids_xpath)
- language = match_language(resp.search_params['language'], supported_languages, language_aliases).split('-')[0]
+ if resp.search_params['language'].split('-')[0] == 'all':
+ language = 'en'
+ else:
+ language = match_language(resp.search_params['language'], supported_languages, language_aliases).split('-')[0]
# TODO: make requests asynchronous to avoid timeout when result_count > 1
for search_result in search_results[:result_count]: