summaryrefslogtreecommitdiff
path: root/searx/engines/bing_videos.py
diff options
context:
space:
mode:
authorNoémi Ványi <kvch@users.noreply.github.com>2020-04-15 23:33:16 +0200
committerGitHub <noreply@github.com>2020-04-15 23:33:16 +0200
commitfcb44c654228a210ed66533f6aa7847035cbf985 (patch)
treec681cc52463ae6fab9f68c36e4f1edff6df84261 /searx/engines/bing_videos.py
parent4f90fb6a9236a9699e80c249153ba372bf308cb8 (diff)
parent4eddbca81d7a9f7d2c8b7059a2b4d0787804cbb0 (diff)
Merge branch 'master' into fix_startpage_ValueError_on_spanish_datetime
Diffstat (limited to 'searx/engines/bing_videos.py')
-rw-r--r--searx/engines/bing_videos.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/engines/bing_videos.py b/searx/engines/bing_videos.py
index f1e636819..f048f0d8e 100644
--- a/searx/engines/bing_videos.py
+++ b/searx/engines/bing_videos.py
@@ -12,10 +12,10 @@
from json import loads
from lxml import html
-from searx.engines.bing_images import _fetch_supported_languages, supported_languages_url
from searx.url_utils import urlencode
from searx.utils import match_language
+from searx.engines.bing import _fetch_supported_languages, supported_languages_url, language_aliases
categories = ['videos']
paging = True
@@ -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