aboutsummaryrefslogtreecommitdiff
path: root/test/test_youtube_subtitles.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-06-26 11:28:47 +0200
committerIsmael Mejia <iemejia@gmail.com>2013-06-26 11:28:47 +0200
commit65cceef8f4d0fc4679f98331adb933bd028c3670 (patch)
treeb6eec383fa5cd336813034684ea9b819d42c50e6 /test/test_youtube_subtitles.py
parentb004821fa98a5ac563811f37b744c632dd58d559 (diff)
Added support for additional vtt subtitle format (WebVTT) in youtube-dl.
Diffstat (limited to 'test/test_youtube_subtitles.py')
-rw-r--r--test/test_youtube_subtitles.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_youtube_subtitles.py b/test/test_youtube_subtitles.py
index dad15de37..5814e13d4 100644
--- a/test/test_youtube_subtitles.py
+++ b/test/test_youtube_subtitles.py
@@ -84,7 +84,7 @@ class TestYoutubeSubtitles(unittest.TestCase):
info_dict = IE.extract('QRS8MkLhQmM')
subtitles = info_dict[0]['subtitles']
self.assertEqual(len(subtitles), 13)
- def test_youtube_subtitles_format(self):
+ def test_youtube_subtitles_sbv_format(self):
DL = FakeYDL()
DL.params['writesubtitles'] = True
DL.params['subtitlesformat'] = 'sbv'
@@ -92,6 +92,14 @@ class TestYoutubeSubtitles(unittest.TestCase):
info_dict = IE.extract('QRS8MkLhQmM')
sub = info_dict[0]['subtitles'][0]
self.assertEqual(md5(sub[2]), '13aeaa0c245a8bed9a451cb643e3ad8b')
+ def test_youtube_subtitles_vtt_format(self):
+ DL = FakeYDL()
+ DL.params['writesubtitles'] = True
+ DL.params['subtitlesformat'] = 'vtt'
+ IE = YoutubeIE(DL)
+ info_dict = IE.extract('QRS8MkLhQmM')
+ sub = info_dict[0]['subtitles'][0]
+ self.assertEqual(md5(sub[2]), '356cdc577fde0c6783b9b822e7206ff7')
def test_youtube_list_subtitles(self):
DL = FakeYDL()
DL.params['listsubtitles'] = True