mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 02:22:22 +02:00
remove 'all' option from search languages
This commit is contained in:
parent
46fb0d860e
commit
4d1770398a
56 changed files with 166 additions and 249 deletions
|
@ -57,8 +57,6 @@ calendar_name_xpath = './/sup[contains(@class,"wb-calendar-name")]'
|
|||
|
||||
def request(query, params):
|
||||
language = params['language'].split('-')[0]
|
||||
if language == 'all':
|
||||
language = 'en'
|
||||
|
||||
params['url'] = url_search.format(
|
||||
query=urlencode({'label': query, 'language': language}))
|
||||
|
@ -71,8 +69,6 @@ def response(resp):
|
|||
wikidata_ids = html.xpath(wikidata_ids_xpath)
|
||||
|
||||
language = resp.search_params['language'].split('-')[0]
|
||||
if language == 'all':
|
||||
language = 'en'
|
||||
|
||||
# TODO: make requests asynchronous to avoid timeout when result_count > 1
|
||||
for wikidata_id in wikidata_ids[:result_count]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue