summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-01-23 11:37:14 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-01-23 11:37:14 +0100
commit5f92dfcdbe6e6db9781c2b82a2bd8ba4914b89e6 (patch)
treee5113f6f9a4ff6fe2535b2a3b03fe96784099470
parentbaec54c49295020bd925e34a705afca29d7458f3 (diff)
downloadsearxng-5f92dfcdbe6e6db9781c2b82a2bd8ba4914b89e6.tar.gz
searxng-5f92dfcdbe6e6db9781c2b82a2bd8ba4914b89e6.zip
[fix] google-news: query uses locale without country tag
Wthout country-region tag google will redirect to correct the contry tag [1]: SEARX_DEBUG=1 searx-checker -v "google news" ... https://news.google.com:443 "GET /search?q=computer&hl=en... HTTP/1.1" 302 0 https://news.google.com:443 "GET /search?q=computer&hl=en-US&.... HTTP/1.1" 200 None ... [1] https://github.com/searx/searx/pull/2483#issuecomment-765600849 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rw-r--r--searx/engines/google_news.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index d04ff153b..f5f289bb7 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -85,7 +85,7 @@ def request(query, params):
query_url = 'https://'+ subdomain + '/search' + "?" + urlencode({
'q': query,
- 'hl': language,
+ 'hl': lang_country,
'lr': "lang_" + language,
'ie': "utf8",
'oe': "utf8",