diff options
author | coletdjnz <coletdjnz@protonmail.com> | 2023-07-23 17:17:15 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-23 05:17:15 +0000 |
commit | 86aea0d3a213da3be1da638b9b828e6f0ee1d59f (patch) | |
tree | 886b293881ab2f01d1d46f7c6b74cbaa21e35fdf /yt_dlp/networking/_urllib.py | |
parent | 11de6fec9c9b8d34d1f90c8e6218ec58a3471b58 (diff) | |
download | hypervideo-pre-86aea0d3a213da3be1da638b9b828e6f0ee1d59f.tar.lz hypervideo-pre-86aea0d3a213da3be1da638b9b828e6f0ee1d59f.tar.xz hypervideo-pre-86aea0d3a213da3be1da638b9b828e6f0ee1d59f.zip |
[networking] Add strict Request extension checking (#7604)
Authored by: coletdjnz
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Diffstat (limited to 'yt_dlp/networking/_urllib.py')
-rw-r--r-- | yt_dlp/networking/_urllib.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/networking/_urllib.py b/yt_dlp/networking/_urllib.py index ff3a22c8c..3fe5fa52e 100644 --- a/yt_dlp/networking/_urllib.py +++ b/yt_dlp/networking/_urllib.py @@ -385,6 +385,11 @@ class UrllibRH(RequestHandler, InstanceStoreMixin): if self.enable_file_urls: self._SUPPORTED_URL_SCHEMES = (*self._SUPPORTED_URL_SCHEMES, 'file') + def _check_extensions(self, extensions): + super()._check_extensions(extensions) + extensions.pop('cookiejar', None) + extensions.pop('timeout', None) + def _create_instance(self, proxies, cookiejar): opener = urllib.request.OpenerDirector() handlers = [ |