aboutsummaryrefslogtreecommitdiff
path: root/test/test_subtitles.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-12-31 14:15:16 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-12-31 14:15:16 +0100
commit7d900ef1bf131fc140d35d306500a5cec9565f89 (patch)
treec7cb1e491b54238f694243b945a596fdb26568f6 /test/test_subtitles.py
parent1931a73f392698d01d148f69e612391ad2d7138d (diff)
[youtube] Add support for automatically translated subtitles (fixes #4555)
They have a manually uploaded subtitles track and YouTube can transtale it.
Diffstat (limited to 'test/test_subtitles.py')
-rw-r--r--test/test_subtitles.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_subtitles.py b/test/test_subtitles.py
index 7c4cd8218..d34565191 100644
--- a/test/test_subtitles.py
+++ b/test/test_subtitles.py
@@ -88,6 +88,14 @@ class TestYoutubeSubtitles(BaseTestSubtitles):
subtitles = self.getSubtitles()
self.assertTrue(subtitles['it'] is not None)
+ def test_youtube_translated_subtitles(self):
+ # This video has a subtitles track, which can be translated
+ self.url = 'Ky9eprVWzlI'
+ self.DL.params['writeautomaticsub'] = True
+ self.DL.params['subtitleslangs'] = ['it']
+ subtitles = self.getSubtitles()
+ self.assertTrue(subtitles['it'] is not None)
+
def test_youtube_nosubtitles(self):
self.DL.expect_warning('video doesn\'t have subtitles')
self.url = 'n5BB19UTcdA'