From 8df1f0c47e03fe7525c40a2856dba950bab8998b Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Mon, 1 Aug 2022 17:01:59 +0200 Subject: [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 --- searx/engines/bing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines/bing.py') diff --git a/searx/engines/bing.py b/searx/engines/bing.py index 3d4ac08bd..8d024fed0 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -25,6 +25,7 @@ categories = ['general', 'web'] paging = True time_range_support = False safesearch = False +send_accept_language_header = True supported_languages_url = 'https://www.bing.com/account/general' language_aliases = {} @@ -68,7 +69,6 @@ def request(query, params): logger.debug("headers.Referer --> %s", referer) params['url'] = base_url + search_path - params['headers']['Accept-Language'] = "en-US,en;q=0.5" params['headers']['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' return params -- cgit v1.2.3