diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-02-28 20:51:54 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-02-28 20:51:54 +0100 |
commit | 29cad7ad130c2e093c06d269c3b222e33adc218f (patch) | |
tree | 58d6b44e87712e9c461b83f892dbd7d173214eed /youtube_dl/extractor/lynda.py | |
parent | 1a2313a6f2d83c9e0a5c0c25bf5a2e3167994dbe (diff) | |
parent | 0d103de3b0b03c5027f0015327c2c44b9073513a (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'youtube_dl/extractor/lynda.py')
-rw-r--r-- | youtube_dl/extractor/lynda.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/youtube_dl/extractor/lynda.py b/youtube_dl/extractor/lynda.py index 109055e72..5dc22da22 100644 --- a/youtube_dl/extractor/lynda.py +++ b/youtube_dl/extractor/lynda.py @@ -18,7 +18,7 @@ from ..utils import ( class LyndaIE(InfoExtractor): IE_NAME = 'lynda' IE_DESC = 'lynda.com videos' - _VALID_URL = r'https?://www\.lynda\.com/[^/]+/[^/]+/\d+/(\d+)-\d\.html' + _VALID_URL = r'https?://www\.lynda\.com/(?:[^/]+/[^/]+/\d+|player/embed)/(\d+)' _LOGIN_URL = 'https://www.lynda.com/login/login.aspx' _NETRC_MACHINE = 'lynda' @@ -27,7 +27,7 @@ class LyndaIE(InfoExtractor): ACCOUNT_CREDENTIALS_HINT = 'Use --username and --password options to provide lynda.com account credentials.' - _TEST = { + _TESTS = [{ 'url': 'http://www.lynda.com/Bootstrap-tutorials/Using-exercise-files/110885/114408-4.html', 'md5': 'ecfc6862da89489161fb9cd5f5a6fac1', 'info_dict': { @@ -36,7 +36,10 @@ class LyndaIE(InfoExtractor): 'title': 'Using the exercise files', 'duration': 68 } - } + }, { + 'url': 'https://www.lynda.com/player/embed/133770?tr=foo=1;bar=g;fizz=rt&fs=0', + 'only_matching': True, + }] def _real_initialize(self): self._login() @@ -152,7 +155,7 @@ class LyndaIE(InfoExtractor): continue appear_time = m_current.group('timecode') disappear_time = m_next.group('timecode') - text = seq_current['Caption'] + text = seq_current['Caption'].lstrip() srt += '%s\r\n%s --> %s\r\n%s' % (str(pos), appear_time, disappear_time, text) if srt: return srt |