mirror of
https://github.com/searxng/searxng.git
synced 2025-07-14 00:39:18 +02:00
[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>
This commit is contained in:
parent
a2badb4fe4
commit
8df1f0c47e
21 changed files with 52 additions and 26 deletions
|
@ -52,6 +52,7 @@ language_support = True
|
|||
use_locale_domain = True
|
||||
time_range_support = True
|
||||
safesearch = False
|
||||
send_accept_language_header = True
|
||||
|
||||
|
||||
def time_range_url(params):
|
||||
|
@ -75,7 +76,6 @@ def request(query, params):
|
|||
|
||||
offset = (params['pageno'] - 1) * 10
|
||||
lang_info = get_lang_info(params, supported_languages, language_aliases, False)
|
||||
logger.debug("HTTP header Accept-Language --> %s", lang_info['headers']['Accept-Language'])
|
||||
|
||||
# subdomain is: scholar.google.xy
|
||||
lang_info['subdomain'] = lang_info['subdomain'].replace("www.", "scholar.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue