diff options
Diffstat (limited to 'searx/engines/google_videos.py')
| -rw-r--r-- | searx/engines/google_videos.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/searx/engines/google_videos.py b/searx/engines/google_videos.py index 06aac8ae1..26dbcdd3c 100644 --- a/searx/engines/google_videos.py +++ b/searx/engines/google_videos.py @@ -60,6 +60,7 @@ language_support = True use_locale_domain = True time_range_support = True safesearch = True +send_accept_language_header = True RE_CACHE = {} @@ -111,22 +112,13 @@ def request(query, params): """Google-Video search request""" lang_info = get_lang_info(params, supported_languages, language_aliases, False) - logger.debug("HTTP header Accept-Language --> %s", lang_info['headers']['Accept-Language']) query_url = ( 'https://' + lang_info['subdomain'] + '/search' + "?" - + urlencode( - { - 'q': query, - 'tbm': "vid", - **lang_info['params'], - 'ie': "utf8", - 'oe': "utf8", - } - ) + + urlencode({'q': query, 'tbm': "vid", **lang_info['params'], 'ie': "utf8", 'oe': "utf8"}) ) if params['time_range'] in time_range_dict: @@ -135,6 +127,7 @@ def request(query, params): query_url += '&' + urlencode({'safe': filter_mapping[params['safesearch']]}) params['url'] = query_url + params['cookies']['CONSENT'] = "YES+" params['headers'].update(lang_info['headers']) params['headers']['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' return params |