projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0c6c2b
)
[lynda] Skip invalid subtitles (closes #15159)
author
Sergey M․
<dstftw@gmail.com>
Wed, 3 Jan 2018 09:41:28 +0000
(16:41 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 3 Jan 2018 09:41:28 +0000
(16:41 +0700)
youtube_dl/extractor/lynda.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/lynda.py
b/youtube_dl/extractor/lynda.py
index 1b6f5091d36eecb0f241b95e38739d4b967d6c34..0d6026aaddd1031c85f0a70987d843a0a4962096 100644
(file)
--- a/
youtube_dl/extractor/lynda.py
+++ b/
youtube_dl/extractor/lynda.py
@@
-244,8
+244,9
@@
class LyndaIE(LyndaBaseIE):
def _get_subtitles(self, video_id):
url = 'https://www.lynda.com/ajax/player?videoId=%s&type=transcript' % video_id
subs = self._download_json(url, None, False)
- if subs:
- return {'en': [{'ext': 'srt', 'data': self._fix_subtitles(subs)}]}
+ fixed_subs = self._fix_subtitles(subs)
+ if fixed_subs:
+ return {'en': [{'ext': 'srt', 'data': fixed_subs}]}
else:
return {}