summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-11-21 16:28:53 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-11-21 16:28:53 +0100
commit9ab8536479f30960e79ed165369e97c635ed1be7 (patch)
tree6fc183612b9b1fc4c7c89c1b5d53c3f9078eff39 /searx
parent128eb76604c1cbea867c7f0cf43f38df7edca190 (diff)
downloadsearxng-9ab8536479f30960e79ed165369e97c635ed1be7.tar.gz
searxng-9ab8536479f30960e79ed165369e97c635ed1be7.zip
[fix] fix language support of google
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/google.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index 934f5c29a..03842234f 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -89,7 +89,7 @@ url_map = 'https://www.openstreetmap.org/'\
search_path = '/search'
search_url = ('https://{hostname}' +
search_path +
- '?{query}&start={offset}&gws_rd=cr&gbv=1&lr={lang}&ei=x')
+ '?{query}&start={offset}&gws_rd=cr&gbv=1&hl={lang}&ei=x')
time_range_search = "&tbs=qdr:{range}"
time_range_dict = {'day': 'd',
@@ -167,11 +167,11 @@ def request(query, params):
if params['language'] == 'all':
language = 'en'
country = 'US'
- url_lang = ''
+ url_lang = 'en'
elif params['language'][:2] == 'jv':
language = 'jw'
country = 'ID'
- url_lang = 'lang_jw'
+ url_lang = 'jw'
else:
language_array = params['language'].lower().split('-')
if len(language_array) == 2:
@@ -179,7 +179,7 @@ def request(query, params):
else:
country = 'US'
language = language_array[0] + ',' + language_array[0] + '-' + country
- url_lang = 'lang_' + language_array[0]
+ url_lang = language_array[0]
if use_locale_domain:
google_hostname = country_to_hostname.get(country.upper(), default_hostname)