projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73cbd70
)
[safari] Fix authentication
author
Sergey M․
<dstftw@gmail.com>
Sat, 12 Mar 2016 20:08:36 +0000
(
02:08
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 12 Mar 2016 20:08:36 +0000
(
02:08
+0600)
youtube_dl/extractor/safari.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/safari.py
b/youtube_dl/extractor/safari.py
index 56a7dfb92e547fec76218bc8c86c742552bc1bf5..10c7f39b0402b785369d8bfce6936ba1521b993f 100644
(file)
--- a/
youtube_dl/extractor/safari.py
+++ b/
youtube_dl/extractor/safari.py
@@
-27,12
+27,13
@@
class SafariBaseIE(InfoExtractor):
LOGGED_IN = False
def _real_initialize(self):
LOGGED_IN = False
def _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):
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
(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)
'Login failed; make sure your credentials are correct and try again.',
expected=True)
+ SafariBaseIE.LOGGED_IN = True
+
self.to_screen('Login successful')
self.to_screen('Login successful')