diff options
Diffstat (limited to 'searx/engines/google_videos.py')
-rw-r--r-- | searx/engines/google_videos.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/searx/engines/google_videos.py b/searx/engines/google_videos.py index 3e3f5d6f1..81e0a8473 100644 --- a/searx/engines/google_videos.py +++ b/searx/engines/google_videos.py @@ -119,14 +119,13 @@ def request(query, params): lang_info = get_lang_info( # pylint: disable=undefined-variable - params, supported_languages, language_aliases + params, supported_languages, language_aliases, False ) query_url = 'https://' + lang_info['subdomain'] + '/search' + "?" + urlencode({ 'q': query, 'tbm': "vid", - 'hl': lang_info['hl'], - 'lr': lang_info['lr'], + **lang_info['params'], 'ie': "utf8", 'oe': "utf8", }) @@ -139,8 +138,8 @@ def request(query, params): logger.debug("query_url --> %s", query_url) params['url'] = query_url - logger.debug("HTTP header Accept-Language --> %s", lang_info['Accept-Language']) - params['headers']['Accept-Language'] = lang_info['Accept-Language'] + logger.debug("HTTP header Accept-Language --> %s", lang_info.get('Accept-Language')) + params['headers'].update(lang_info['headers']) params['headers']['Accept'] = ( 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' ) |