diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-01 17:28:59 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-03-01 17:28:59 +0100 |
commit | ad7a6e6e1022923850343b2c19e47bbd9fbad050 (patch) | |
tree | e61e7ad412e84fe28570edad8edc13e6551af4ad /searx | |
parent | 1c853f9573a85d9885d3c99b7e3210c834e5e5f3 (diff) | |
download | searxng-ad7a6e6e1022923850343b2c19e47bbd9fbad050.tar.gz searxng-ad7a6e6e1022923850343b2c19e47bbd9fbad050.zip |
bugfix(!biv) : bing-video do not like "older" User-Agents
When selecting other languages than 'en', bing-video did not handle the language
correct and gave very bad results. Since User-Agent is normaly rotated in
searx, the behavior of a !biv search was unpredictable and paging was broken.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/bing_videos.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/engines/bing_videos.py b/searx/engines/bing_videos.py index 6e7b6d3aa..f048f0d8e 100644 --- a/searx/engines/bing_videos.py +++ b/searx/engines/bing_videos.py @@ -67,6 +67,10 @@ 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 |