summaryrefslogtreecommitdiff
path: root/searx/engines/qwant.py
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2017-07-20 15:47:20 -0500
committerMarc Abonce Seguin <marc-abonce@mailbox.org>2017-12-06 01:20:15 -0600
commit4d1770398a6af8902e75c0bd885781584d39e796 (patch)
tree1ad30e59206eca081c93a2ad37928ce059f7d114 /searx/engines/qwant.py
parent46fb0d860e35a45658969c4e2ac306a1072bc331 (diff)
downloadsearxng-4d1770398a6af8902e75c0bd885781584d39e796.tar.gz
searxng-4d1770398a6af8902e75c0bd885781584d39e796.zip
remove 'all' option from search languages
Diffstat (limited to 'searx/engines/qwant.py')
-rw-r--r--searx/engines/qwant.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/searx/engines/qwant.py b/searx/engines/qwant.py
index 3d266e228..408c2b3de 100644
--- a/searx/engines/qwant.py
+++ b/searx/engines/qwant.py
@@ -44,18 +44,17 @@ def request(query, params):
query=urlencode({'q': query}),
offset=offset)
- # add language tag if specified
- if params['language'] != 'all':
- if params['language'] == 'no' or params['language'].startswith('no-'):
- params['language'] = params['language'].replace('no', 'nb', 1)
- if params['language'].find('-') < 0:
- # tries to get a country code from language
- for lang in supported_languages:
- lc = lang.split('-')
- if params['language'] == lc[0]:
- params['language'] = lang
- break
- params['url'] += '&locale=' + params['language'].replace('-', '_').lower()
+ # add language tag
+ if params['language'] == 'no' or params['language'].startswith('no-'):
+ params['language'] = params['language'].replace('no', 'nb', 1)
+ if params['language'].find('-') < 0:
+ # tries to get a country code from language
+ for lang in supported_languages:
+ lc = lang.split('-')
+ if params['language'] == lc[0]:
+ params['language'] = lang
+ break
+ params['url'] += '&locale=' + params['language'].replace('-', '_').lower()
return params