diff options
author | remitamine <remitamine@gmail.com> | 2016-02-20 22:02:03 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2016-02-20 22:02:03 +0100 |
commit | cafcf657a4e16f0bcf90195f8e35bfcce7faad8e (patch) | |
tree | d4b4ffd697459393f72b952a98afdc7495031776 /youtube_dl/extractor/theplatform.py | |
parent | 7360db05b43741c2dfa1fd024e9c2f013ed97c9e (diff) |
add more subtitles mime types to mimetype2ext and fix the platform subtitle extraction
Diffstat (limited to 'youtube_dl/extractor/theplatform.py')
-rw-r--r-- | youtube_dl/extractor/theplatform.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py index 755f816ff..93d871571 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/youtube_dl/extractor/theplatform.py @@ -21,6 +21,7 @@ from ..utils import ( sanitized_Request, unsmuggle_url, xpath_with_ns, + mimetype2ext, ) default_ns = 'http://www.w3.org/2005/SMIL21/Language' @@ -68,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, }] |