aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/util.py
diff options
context:
space:
mode:
authorAstound <kirito@disroot.org>2025-03-01 01:12:05 +0800
committerAstound <kirito@disroot.org>2025-03-01 01:12:09 +0800
commit57854169f4d84a68ae00502f21809ee6826185f9 (patch)
treea4eb80e24393cf4e2af7a7c25c296d5442510b60 /youtube/util.py
parent3217305f9f36a12207a47823b3b64acfd1f2b321 (diff)
downloadyt-local-57854169f4d84a68ae00502f21809ee6826185f9.tar.lz
yt-local-57854169f4d84a68ae00502f21809ee6826185f9.tar.xz
yt-local-57854169f4d84a68ae00502f21809ee6826185f9.zip
minor fix deprecation warning
tests/test_util.py: 14 warnings /home/runner/work/yt-local/youtube-local/youtube/util.py:321: DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default). response.getheader('Content-Encoding', default='identity'))
Diffstat (limited to 'youtube/util.py')
-rw-r--r--youtube/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/util.py b/youtube/util.py
index eb121e1..356a795 100644
--- a/youtube/util.py
+++ b/youtube/util.py
@@ -318,7 +318,7 @@ def fetch_url(url, headers=(), timeout=15, report_text=None, data=None,
cleanup_func(response) # release_connection for urllib3
content = decode_content(
content,
- response.getheader('Content-Encoding', default='identity'))
+ response.headers.get('Content-Encoding', default='identity'))
if (settings.debugging_save_responses
and debug_name is not None