projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dplay] Add extractor (closes #7515)
[youtube-dl]
/
youtube_dl
/
extractor
/
lynda.py
diff --git
a/youtube_dl/extractor/lynda.py
b/youtube_dl/extractor/lynda.py
index c8a16842eb49f172d9a49b3c36e408ee82e40a94..3d7e7e003e1b2d4dce2d04bdde1d1ae5c252b82d 100644
(file)
--- a/
youtube_dl/extractor/lynda.py
+++ b/
youtube_dl/extractor/lynda.py
@@
-25,7
+25,7
@@
class LyndaBaseIE(InfoExtractor):
self._login()
def _login(self):
self._login()
def _login(self):
-
(username, password)
= self._get_login_info()
+
username, password
= self._get_login_info()
if username is None:
return
if username is None:
return
@@
-83,6
+83,10
@@
class LyndaBaseIE(InfoExtractor):
raise ExtractorError('Unable to log in')
def _logout(self):
raise ExtractorError('Unable to log in')
def _logout(self):
+ username, _ = self._get_login_info()
+ if username is None:
+ return
+
self._download_webpage(
'http://www.lynda.com/ajax/logout.aspx', None,
'Logging out', 'Unable to log out', fatal=False)
self._download_webpage(
'http://www.lynda.com/ajax/logout.aspx', None,
'Logging out', 'Unable to log out', fatal=False)
@@
-227,9
+231,8
@@
class LyndaCourseIE(LyndaBaseIE):
if video.get('HasAccess') is False:
unaccessible_videos += 1
continue
if video.get('HasAccess') is False:
unaccessible_videos += 1
continue
- video_id = video.get('ID')
- if video_id:
- videos.append(video_id)
+ if video.get('ID'):
+ videos.append(video['ID'])
if unaccessible_videos > 0:
self._downloader.report_warning(
if unaccessible_videos > 0:
self._downloader.report_warning(