aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/lynda.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-06 23:06:13 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-06 23:06:13 +0600
commit179ffab69c3359ab7d0a7b0a2b63c94d8c70af67 (patch)
tree518bae800af813b20c480d16e6dcaf4316809a1b /youtube_dl/extractor/lynda.py
parentdeb85c32bbd32e8d280e1919432a11c0bdaa26bb (diff)
[lynda:course] Force log out (Closes #7361)
Diffstat (limited to 'youtube_dl/extractor/lynda.py')
-rw-r--r--youtube_dl/extractor/lynda.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/lynda.py b/youtube_dl/extractor/lynda.py
index 5c973e75c..67f2025de 100644
--- a/youtube_dl/extractor/lynda.py
+++ b/youtube_dl/extractor/lynda.py
@@ -82,6 +82,11 @@ class LyndaBaseIE(InfoExtractor):
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'
@@ -210,6 +215,8 @@ class LyndaCourseIE(LyndaBaseIE):
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)