[limelight] Extract ttml subtitles (Closes #9739)
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Jun 2016 22:57:27 +0000 (05:57 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Jun 2016 22:57:27 +0000 (05:57 +0700)
youtube_dl/extractor/limelight.py

index a25fb8e2c7de8ae492089fca362fabc831e60ff1..5d2c3e256740d865e1c0be2c8e2808a9ee97ee43 100644 (file)
@@ -102,9 +102,15 @@ class LimelightBaseIE(InfoExtractor):
             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,