aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-02-21 22:12:36 +0100
committerIsmael Mejia <iemejia@gmail.com>2013-02-21 22:12:36 +0100
commitcdb130b09a16865b81fd34d19b74fa634d45cad7 (patch)
treebd82790267b51435a4bfe6eddda77b4c2f32af15 /test
parent2e5d60b7db7020b726cd54ee4cad8f2afbd1479d (diff)
downloadyoutube-dl-cdb130b09a16865b81fd34d19b74fa634d45cad7.tar.xz
Added new option '--only-srt' to download only the subtitles of a video
Improved option '--srt-lang' - it shows the argument in case of missing subtitles - added language suffix for non-english languages (e.g. video.it.srt)
Diffstat (limited to 'test')
-rw-r--r--test/test_youtube_subtitles.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_youtube_subtitles.py b/test/test_youtube_subtitles.py
index ff09ea459..77c275b75 100644
--- a/test/test_youtube_subtitles.py
+++ b/test/test_youtube_subtitles.py
@@ -53,5 +53,12 @@ class TestYoutubeSubtitles(unittest.TestCase):
info_dict = IE.extract('QRS8MkLhQmM')
self.assertEqual(md5(info_dict[0]['subtitles']), '164a51f16f260476a05b50fe4c2f161d')
+ def test_youtube_onlysubtitles(self):
+ DL = FakeDownloader()
+ DL.params['onlysubtitles'] = True
+ IE = YoutubeIE(DL)
+ info_dict = IE.extract('QRS8MkLhQmM')
+ self.assertEqual(md5(info_dict[0]['subtitles']), '4cd9278a35ba2305f47354ee13472260')
+
if __name__ == '__main__':
unittest.main()