projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb61b57
)
[mtv] correct scc extention in extracted subtitles(closes #13730)
author
Remita Amine
<remitamine@gmail.com>
Wed, 29 Nov 2017 16:50:38 +0000
(17:50 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Wed, 29 Nov 2017 16:50:38 +0000
(17:50 +0100)
youtube_dl/extractor/mtv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/mtv.py
b/youtube_dl/extractor/mtv.py
index 1154a35365ca9b388ebfdbe2a5790f67a25ee750..7a3b57abd852f4ffb8e49bdce9d9e8029fca65c3 100644
(file)
--- a/
youtube_dl/extractor/mtv.py
+++ b/
youtube_dl/extractor/mtv.py
@@
-115,10
+115,17
@@
class MTVServicesInfoExtractor(InfoExtractor):
if transcript.get('kind') != 'captions':
continue
lang = transcript.get('srclang')
if transcript.get('kind') != 'captions':
continue
lang = transcript.get('srclang')
- subtitles[lang] = [{
- 'url': compat_str(typographic.get('src')),
- 'ext': typographic.get('format')
- } for typographic in transcript.findall('./typographic')]
+ for typographic in transcript.findall('./typographic'):
+ sub_src = typographic.get('src')
+ if not sub_src:
+ continue
+ ext = typographic.get('format')
+ if ext == 'cea-608':
+ ext = 'scc'
+ subtitles.setdefault(lang, []).append({
+ 'url': compat_str(sub_src),
+ 'ext': ext
+ })
return subtitles
def _get_video_info(self, itemdoc, use_hls=True):
return subtitles
def _get_video_info(self, itemdoc, use_hls=True):