diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-23 09:44:22 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-06-23 09:57:26 +0530 |
commit | 9809740ba5cc5daf53e690d104a37aa6545e53f9 (patch) | |
tree | 77a43dca6247d0ce1045cd81ad1b0c774028e9ff /yt_dlp/extractor/common.py | |
parent | f67baae17e76997c13d35f65f50be633106837e0 (diff) | |
download | hypervideo-pre-9809740ba5cc5daf53e690d104a37aa6545e53f9.tar.lz hypervideo-pre-9809740ba5cc5daf53e690d104a37aa6545e53f9.tar.xz hypervideo-pre-9809740ba5cc5daf53e690d104a37aa6545e53f9.zip |
[extractor, cleanup] Reduce direct use of `_downloader`
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index f4c34f43c..fe43ff519 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -695,6 +695,14 @@ class InfoExtractor: """Sets a YoutubeDL instance as the downloader for this IE.""" self._downloader = downloader + @property + def cache(self): + return self._downloader.cache + + @property + def cookiejar(self): + return self._downloader.cookiejar + def _initialize_pre_login(self): """ Intialization before login. Redefine in subclasses.""" pass @@ -3593,7 +3601,7 @@ class InfoExtractor: 0, name, value, port, port is not None, domain, True, domain.startswith('.'), path, True, secure, expire_time, discard, None, None, rest) - self._downloader.cookiejar.set_cookie(cookie) + self.cookiejar.set_cookie(cookie) def _get_cookies(self, url): """ Return a compat_cookies_SimpleCookie with the cookies for the url """ |