1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-30 03:58:24 +01:00

[limelight] Extract ttml subtitles (Closes #9739)

This commit is contained in:
Sergey M․ 2016-06-11 05:57:27 +07:00
parent 21ac1a8ac3
commit fe458b6596
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -102,9 +102,15 @@ class LimelightBaseIE(InfoExtractor):
lang = caption.get('language_code') lang = caption.get('language_code')
subtitles_url = caption.get('url') subtitles_url = caption.get('url')
if lang and subtitles_url: if lang and subtitles_url:
subtitles[lang] = [{ subtitles.setdefault(lang, []).append({
'url': subtitles_url, '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 { return {
'id': video_id, 'id': video_id,