Parcourir la source

[fix] use english in google engine if no language was set - this prevents guessing the language by the IP of the instance

Adam Tauber il y a 7 ans
Parent
révision
6eb9503896
1 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. 3
    4
      searx/engines/google.py

+ 3
- 4
searx/engines/google.py Voir le fichier

@@ -165,10 +165,9 @@ def request(query, params):
165 165
     offset = (params['pageno'] - 1) * 10
166 166
 
167 167
     if params['language'] == 'all':
168
-        language = 'en'
169
-        country = 'US'
170
-        url_lang = 'lang_en'
171
-    elif params['language'][:2] == 'jv':
168
+        params['language'] = 'en-GB'
169
+
170
+    if params['language'][:2] == 'jv':
172 171
         language = 'jw'
173 172
         country = 'ID'
174 173
         url_lang = 'lang_jw'