diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-11 16:31:50 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-11 16:31:50 +0200 |
commit | 2ac3e5b20b50045574d55ff01cfa19f3ca9da8b9 (patch) | |
tree | 13ba5964da057d827cff88fc87449afe9ea67d86 /searx/engines/google_images.py | |
parent | 1ac396133677d4b4171bad89885a5cdacce51d83 (diff) | |
download | searxng-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_images.py')
-rw-r--r-- | searx/engines/google_images.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index 0f8f1c73e..e7382a6fe 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -103,6 +103,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, @@ -117,11 +119,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' |