]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/packtpub.py
[extractor] Add `_perform_login` function (#2943)
[yt-dlp.git] / yt_dlp / extractor / packtpub.py
index c06fca7952dcb4e68711b6eb683811a7a7defca5..62c52cd6e4826a5aa6c75fb7eda7d648ef621dff 100644 (file)
@@ -47,10 +47,7 @@ class PacktPubIE(PacktPubBaseIE):
     _NETRC_MACHINE = 'packtpub'
     _TOKEN = None
 
-    def _real_initialize(self):
-        username, password = self._get_login_info()
-        if username is None:
-            return
+    def _perform_login(self, username, password):
         try:
             self._TOKEN = self._download_json(
                 'https://services.packtpub.com/auth-v1/users/tokens', None,