aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/discoverygo.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-12-16 12:55:20 +0100
committerRemita Amine <remitamine@gmail.com>2017-12-16 12:55:44 +0100
commitc402e7f3a03aceeb80dd032831ceafb6d0aaa935 (patch)
tree98955ed2dc045fa5fa22f967d8353889a2c89815 /youtube_dl/extractor/discoverygo.py
parent498a8a4ca56e66adb84f8f1488c0239d048c7adc (diff)
[discoverygo] correct ttml subtitle extension
Diffstat (limited to 'youtube_dl/extractor/discoverygo.py')
-rw-r--r--youtube_dl/extractor/discoverygo.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/discoverygo.py b/youtube_dl/extractor/discoverygo.py
index 99376454b..3368c4c07 100644
--- a/youtube_dl/extractor/discoverygo.py
+++ b/youtube_dl/extractor/discoverygo.py
@@ -5,6 +5,7 @@ import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
+ determine_ext,
extract_attributes,
ExtractorError,
int_or_none,
@@ -73,7 +74,11 @@ class DiscoveryGoBaseIE(InfoExtractor):
not subtitle_url.startswith('http')):
continue
lang = caption.get('fileLang', 'en')
- subtitles.setdefault(lang, []).append({'url': subtitle_url})
+ ext = determine_ext(subtitle_url)
+ subtitles.setdefault(lang, []).append({
+ 'url': subtitle_url,
+ 'ext': 'ttml' if ext == 'xml' else ext,
+ })
return {
'id': video_id,