summaryrefslogtreecommitdiff
path: root/searx/engines/google_videos.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-06-11 16:31:50 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-06-11 16:31:50 +0200
commit2ac3e5b20b50045574d55ff01cfa19f3ca9da8b9 (patch)
tree13ba5964da057d827cff88fc87449afe9ea67d86 /searx/engines/google_videos.py
parent1ac396133677d4b4171bad89885a5cdacce51d83 (diff)
downloadsearxng-2ac3e5b20b50045574d55ff01cfa19f3ca9da8b9.tar.gz
searxng-2ac3e5b20b50045574d55ff01cfa19f3ca9da8b9.zip
[fix] log messages from: google- images, news, scholar, videos
- HTTP header Accept-Language --> lang_info['headers']['Accept-Language'] - remove obsolete query_url log messages which is already logged by httpx._client:HTTP request Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/google_videos.py')
-rw-r--r--searx/engines/google_videos.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/engines/google_videos.py b/searx/engines/google_videos.py
index 81e0a8473..c57db4e63 100644
--- a/searx/engines/google_videos.py
+++ b/searx/engines/google_videos.py
@@ -121,6 +121,8 @@ def request(query, params):
# pylint: disable=undefined-variable
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,
@@ -134,11 +136,8 @@ def request(query, params):
query_url += '&' + urlencode({'tbs': 'qdr:' + time_range_dict[params['time_range']]})
if params['safesearch']:
query_url += '&' + urlencode({'safe': filter_mapping[params['safesearch']]})
-
- logger.debug("query_url --> %s", query_url)
params['url'] = query_url
- 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'