self._login()
def _login(self):
- (username, password) = self._get_login_info()
+ username, password = self._get_login_info()
if username is None:
return
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)
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(