Loading docs/admin/engines/settings.rst +8 −0 Original line number Diff line number Diff line Loading @@ -440,6 +440,7 @@ engine is shown. Most of the options have a default value or even are optional. engine: example shortcut: demo base_url: 'https://{language}.example.com/' send_accept_language_header: false categories: general timeout: 3.0 api_key: 'apikey' Loading Loading @@ -488,6 +489,13 @@ engine is shown. Most of the options have a default value or even are optional. use multiple sites using only one engine, or updating the site URL without touching at the code. ``send_accept_language_header`` : Several engines that support languages (or regions) deal with the HTTP header ``Accept-Language`` to build a response that fits to the locale. When this option is activated, the language (locale) that is selected by the user is used to build and send a ``Accept-Language`` header in the request to the origin search engine. ``categories`` : optional Define in which categories this engine will be active. Most of the time, it is defined in the code of the engine, but in a few cases it is useful, like when Loading searx/engines/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ ENGINE_DEFAULT_ARGS = { "enable_http": False, "using_tor_proxy": False, "display_error_messages": True, "send_accept_language_header": False, "tokens": [], "about": {}, } Loading searx/engines/bing.py +1 −1 Original line number Diff line number Diff line Loading @@ -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 = {} Loading Loading @@ -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 Loading searx/engines/bing_images.py +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ categories = ['images', 'web'] paging = True safesearch = True time_range_support = True send_accept_language_header = True supported_languages_url = 'https://www.bing.com/account/general' number_of_results = 28 Loading searx/engines/bing_news.py +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ about = { categories = ['news'] paging = True time_range_support = True send_accept_language_header = True # search-url base_url = 'https://www.bing.com/' Loading Loading
docs/admin/engines/settings.rst +8 −0 Original line number Diff line number Diff line Loading @@ -440,6 +440,7 @@ engine is shown. Most of the options have a default value or even are optional. engine: example shortcut: demo base_url: 'https://{language}.example.com/' send_accept_language_header: false categories: general timeout: 3.0 api_key: 'apikey' Loading Loading @@ -488,6 +489,13 @@ engine is shown. Most of the options have a default value or even are optional. use multiple sites using only one engine, or updating the site URL without touching at the code. ``send_accept_language_header`` : Several engines that support languages (or regions) deal with the HTTP header ``Accept-Language`` to build a response that fits to the locale. When this option is activated, the language (locale) that is selected by the user is used to build and send a ``Accept-Language`` header in the request to the origin search engine. ``categories`` : optional Define in which categories this engine will be active. Most of the time, it is defined in the code of the engine, but in a few cases it is useful, like when Loading
searx/engines/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ ENGINE_DEFAULT_ARGS = { "enable_http": False, "using_tor_proxy": False, "display_error_messages": True, "send_accept_language_header": False, "tokens": [], "about": {}, } Loading
searx/engines/bing.py +1 −1 Original line number Diff line number Diff line Loading @@ -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 = {} Loading Loading @@ -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 Loading
searx/engines/bing_images.py +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ categories = ['images', 'web'] paging = True safesearch = True time_range_support = True send_accept_language_header = True supported_languages_url = 'https://www.bing.com/account/general' number_of_results = 28 Loading
searx/engines/bing_news.py +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ about = { categories = ['news'] paging = True time_range_support = True send_accept_language_header = True # search-url base_url = 'https://www.bing.com/' Loading