diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2022-08-01 17:01:59 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-08-01 17:01:59 +0200 |
| commit | 8df1f0c47e03fe7525c40a2856dba950bab8998b (patch) | |
| tree | 844dc7ca4d31f0ff97c07d1817dbfba591420b30 /searx/engines/google_news.py | |
| parent | a2badb4fe47eaa6df26b7bc0ef601cb9179edc3a (diff) | |
[mod] add 'Accept-Language' HTTP header to online processores
Most engines that support languages (and regions) use the Accept-Language from
the WEB browser to build a response that fits to the language (and region).
- add new engine option: send_accept_language_header
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/google_news.py')
| -rw-r--r-- | searx/engines/google_news.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py index 0f97f9289..8f5a4b104 100644 --- a/searx/engines/google_news.py +++ b/searx/engines/google_news.py @@ -70,13 +70,13 @@ time_range_support = True # # safesearch : results are identitical for safesearch=0 and safesearch=2 safesearch = False +send_accept_language_header = True def request(query, params): """Google-News search request""" lang_info = get_lang_info(params, supported_languages, language_aliases, False) - logger.debug("HTTP header Accept-Language --> %s", lang_info['headers']['Accept-Language']) # google news has only one domain lang_info['subdomain'] = 'news.google.com' |