diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-02-28 22:29:01 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2017-02-28 22:29:01 +0800 |
commit | 7c4aa6fd6fd6fadf1cf1942c279cd5c0ff5ae498 (patch) | |
tree | c7020ec61f20042f3d5f7f8aee075b6ee1b1ce88 /youtube_dl/extractor/daisuki.py | |
parent | 9bd05b5a18c535f5517158d505af5dced498d23e (diff) |
[daisuki] Add subtitles (#4738)
Diffstat (limited to 'youtube_dl/extractor/daisuki.py')
-rw-r--r-- | youtube_dl/extractor/daisuki.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/youtube_dl/extractor/daisuki.py b/youtube_dl/extractor/daisuki.py index 6fd09faf1..58cc98666 100644 --- a/youtube_dl/extractor/daisuki.py +++ b/youtube_dl/extractor/daisuki.py @@ -34,6 +34,11 @@ class DaisukiIE(InfoExtractor): 'id': '11213', 'ext': 'mp4', 'title': '#01 Who is in the pumpkin carriage? - THE IDOLM@STER CINDERELLA GIRLS', + 'subtitles': { + 'mul': [{ + 'ext': 'ttml', + }], + }, 'creator': 'BANDAI NAMCO Entertainment', }, 'params': { @@ -101,10 +106,20 @@ class DaisukiIE(InfoExtractor): creator = self._html_search_regex( r'Creator\s*:\s*([^<]+)', webpage, 'creator', fatal=False) + subtitles = {} + caption_url = rtn.get('caption_url') + if caption_url: + # mul: multiple languages + subtitles['mul'] = [{ + 'url': caption_url, + 'ext': 'ttml', + }] + return { 'id': video_id, 'title': title, 'formats': formats, + 'subtitles': subtitles, 'creator': creator, } |