]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/theplatform.py
Add --mark-watched feature (Closes #5054)
[youtube-dl.git] / youtube_dl / extractor / theplatform.py
index f2e975ab0d3e3c4672e16cb0d35214161e097614..93d8715716d00be7e15c53afbe804a3703b38e68 100644 (file)
@@ -20,8 +20,8 @@ from ..utils import (
     int_or_none,
     sanitized_Request,
     unsmuggle_url,
-    url_basename,
     xpath_with_ns,
+    mimetype2ext,
 )
 
 default_ns = 'http://www.w3.org/2005/SMIL21/Language'
@@ -69,7 +69,7 @@ class ThePlatformBaseIE(InfoExtractor):
             for caption in captions:
                 lang, src, mime = caption.get('lang', 'en'), caption.get('src'), caption.get('type')
                 subtitles[lang] = [{
-                    'ext': 'srt' if mime == 'text/srt' else 'ttml',
+                    'ext': mimetype2ext(mime),
                     'url': src,
                 }]
 
@@ -283,7 +283,7 @@ class ThePlatformFeedIE(ThePlatformBaseIE):
         first_video_id = None
         duration = None
         for item in entry['media$content']:
-            smil_url = item['plfile$url'] + '&format=SMIL&Tracking=true&Embedded=true&formats=MPEG4,F4M'
+            smil_url = item['plfile$url'] + '&format=SMIL&mbr=true'
             cur_video_id = ThePlatformIE._match_id(smil_url)
             if first_video_id is None:
                 first_video_id = cur_video_id