mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 15:14:57 +00:00
[mtv] correct scc extention in extracted subtitles(closes #13730)
This commit is contained in:
parent
fb61b57d0f
commit
5ea765fb72
1 changed files with 11 additions and 4 deletions
|
@ -115,10 +115,17 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue