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)
This commit is contained in:
parent
2e5d60b7db
commit
cdb130b09a
4 changed files with 22 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue