summaryrefslogtreecommitdiff
path: root/searx/engines/bing_videos.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-08-01 17:01:59 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2022-08-01 17:01:59 +0200
commit8df1f0c47e03fe7525c40a2856dba950bab8998b (patch)
tree844dc7ca4d31f0ff97c07d1817dbfba591420b30 /searx/engines/bing_videos.py
parenta2badb4fe47eaa6df26b7bc0ef601cb9179edc3a (diff)
downloadsearxng-8df1f0c47e03fe7525c40a2856dba950bab8998b.tar.gz
searxng-8df1f0c47e03fe7525c40a2856dba950bab8998b.zip
[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/bing_videos.py')
-rw-r--r--searx/engines/bing_videos.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/searx/engines/bing_videos.py b/searx/engines/bing_videos.py
index ae8e8d49a..9be8eeaef 100644
--- a/searx/engines/bing_videos.py
+++ b/searx/engines/bing_videos.py
@@ -30,6 +30,7 @@ categories = ['videos', 'web']
paging = True
safesearch = True
time_range_support = True
+send_accept_language_header = True
number_of_results = 28
base_url = 'https://www.bing.com/'
@@ -70,10 +71,6 @@ def request(query, params):
if params['time_range'] in time_range_dict:
params['url'] += time_range_string.format(interval=time_range_dict[params['time_range']])
- # bing videos did not like "older" versions < 70.0.1 when selectin other
- # languages then 'en' .. very strange ?!?!
- params['headers']['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:73.0.1) Gecko/20100101 Firefox/73.0.1'
-
return params