Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad7a6e6e authored by Markus Heiser's avatar Markus Heiser
Browse files

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: default avatarMarkus Heiser <markus.heiser@darmarit.de>
parent 1c853f95
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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