[dplay] Add extractor (closes #7515)
[youtube-dl] / youtube_dl / extractor / lynda.py
index 9a207b2cd425ba2f1b173d9bd52730e511a52fa0..3d7e7e003e1b2d4dce2d04bdde1d1ae5c252b82d 100644 (file)
@@ -25,7 +25,7 @@ class LyndaBaseIE(InfoExtractor):
         self._login()
 
     def _login(self):
-        (username, password) = self._get_login_info()
+        username, password = self._get_login_info()
         if username is None:
             return
 
@@ -83,6 +83,10 @@ class LyndaBaseIE(InfoExtractor):
             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)