summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-11-22 22:56:47 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-11-22 22:56:47 +0100
commit6eb950389680b33a24c8bc1cd666d84a08272b41 (patch)
treea2c0446069c918ccd90266a6b6a8040162547361
parent6fdb6640d9e644860f60bf9cd59847c2d359fc8a (diff)
downloadsearxng-6eb950389680b33a24c8bc1cd666d84a08272b41.tar.gz
searxng-6eb950389680b33a24c8bc1cd666d84a08272b41.zip
[fix] use english in google engine if no language was set - this prevents guessing the language by the IP of the instance
-rw-r--r--searx/engines/google.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index f734ef72e..de2717d81 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -165,10 +165,9 @@ def request(query, params):
offset = (params['pageno'] - 1) * 10
if params['language'] == 'all':
- language = 'en'
- country = 'US'
- url_lang = 'lang_en'
- elif params['language'][:2] == 'jv':
+ params['language'] = 'en-GB'
+
+ if params['language'][:2] == 'jv':
language = 'jw'
country = 'ID'
url_lang = 'lang_jw'