A feature-rich command-line audio/video downloader
[safari] Fix authentication
Sergey M․e9c8999ede2e
diff --git a/youtube_dl/extractor/safari.py b/youtube_dl/extractor/safari.pyindex 56a7dfb92e..10c7f39b04 100644--- a/youtube_dl/extractor/safari.py+++ b/youtube_dl/extractor/safari.py@@ -27,12 +27,13 @@ class SafariBaseIE(InfoExtractor):LOGGED_IN = Falsedef _real_initialize(self):- # We only need to log in once for courses or individual videos- if not self.LOGGED_IN:- self._login()- SafariBaseIE.LOGGED_IN = True+ self._login()def _login(self):+ # We only need to log in once for courses or individual videos+ if self.LOGGED_IN:+ return+(username, password) = self._get_login_info()if username is None:return@@ -68,6 +69,8 @@ class SafariBaseIE(InfoExtractor):'Login failed; make sure your credentials are correct and try again.',expected=True)+ SafariBaseIE.LOGGED_IN = True+self.to_screen('Login successful')