expected=True)
raise ExtractorError('Unable to log in')
+ def _logout(self):
+ self._download_webpage(
+ 'http://www.lynda.com/ajax/logout.aspx', None,
+ 'Logging out', 'Unable to log out', fatal=False)
+
class LyndaIE(LyndaBaseIE):
IE_NAME = 'lynda'
course_id, 'Downloading course JSON')
course_json = json.loads(page)
+ self._logout()
+
if 'Status' in course_json and course_json['Status'] == 'NotFound':
raise ExtractorError(
'Course %s does not exist' % course_id, expected=True)