aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/theplatform.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-02-20 22:02:03 +0100
committerremitamine <remitamine@gmail.com>2016-02-20 22:02:03 +0100
commitcafcf657a4e16f0bcf90195f8e35bfcce7faad8e (patch)
treed4b4ffd697459393f72b952a98afdc7495031776 /youtube_dl/extractor/theplatform.py
parent7360db05b43741c2dfa1fd024e9c2f013ed97c9e (diff)
downloadyoutube-dl-cafcf657a4e16f0bcf90195f8e35bfcce7faad8e.tar.xz
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.py3
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,
}]