on master help sign in
[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>

commit5f92dfcdbe6e6db9781c2b82a2bd8ba4914b89e6 authorMarkus Heiser <markus.heiser@darmarit.de> dateSat 23 Jan 2021, 11:37 (6 years ago) parentbaec54c
1 file changed+1−1
searx/engines/google_news.py+1−1
searx/engines/google_news.py+1−1
@@ -85,7 +85,7 @@ def request(query, params):
8585
8686 query_url = 'https://'+ subdomain + '/search' + "?" + urlencode({
8787 'q': query,
88− 'hl': language,
88+ 'hl': lang_country,
8989 'lr': "lang_" + language,
9090 'ie': "utf8",
9191 'oe': "utf8",