mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-28 22:25:52 +01:00
[limelight] Extract ttml subtitles (Closes #9739)
This commit is contained in:
parent
21ac1a8ac3
commit
fe458b6596
@ -102,9 +102,15 @@ def _extract_info(self, streams, mobile_urls, properties):
|
||||
lang = caption.get('language_code')
|
||||
subtitles_url = caption.get('url')
|
||||
if lang and subtitles_url:
|
||||
subtitles[lang] = [{
|
||||
subtitles.setdefault(lang, []).append({
|
||||
'url': subtitles_url,
|
||||
}]
|
||||
})
|
||||
closed_captions_url = properties.get('closed_captions_url')
|
||||
if closed_captions_url:
|
||||
subtitles.setdefault('en', []).append({
|
||||
'url': closed_captions_url,
|
||||
'ext': 'ttml',
|
||||
})
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
|
Loading…
Reference in New Issue
Block a user