diff options
author | nixxo <[email protected]> | 2021-01-07 14:48:45 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-07 13:48:45 +0000 |
commit | 3a61e6d36003b6043dd53dec5ae714a839225044 (patch) | |
tree | e2d07586424a9ad9ea386f5d47edf396ca4b3ec1 /test/test_subtitles.py | |
parent | 3d8e32dcc0bc6014fe05f445d755907ae046d5b5 (diff) | |
download | youtube-dl-3a61e6d36003b6043dd53dec5ae714a839225044.tar.gz youtube-dl-3a61e6d36003b6043dd53dec5ae714a839225044.zip |
[rai] improve subtitles extraction (#27705)
closes #27698
Diffstat (limited to 'test/test_subtitles.py')
-rw-r--r-- | test/test_subtitles.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 17aaaf20d..550e0ca00 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -258,16 +258,24 @@ class TestNRKSubtitles(BaseTestSubtitles): class TestRaiPlaySubtitles(BaseTestSubtitles): - url = 'http://www.raiplay.it/video/2014/04/Report-del-07042014-cb27157f-9dd0-4aee-b788-b1f67643a391.html' IE = RaiPlayIE - def test_allsubtitles(self): + def test_subtitles_key(self): + self.url = 'http://www.raiplay.it/video/2014/04/Report-del-07042014-cb27157f-9dd0-4aee-b788-b1f67643a391.html' self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['it'])) self.assertEqual(md5(subtitles['it']), 'b1d90a98755126b61e667567a1f6680a') + def test_subtitles_array_key(self): + self.url = 'https://www.raiplay.it/video/2020/12/Report---04-01-2021-2e90f1de-8eee-4de4-ac0e-78d21db5b600.html' + self.DL.params['writesubtitles'] = True + self.DL.params['allsubtitles'] = True + subtitles = self.getSubtitles() + self.assertEqual(set(subtitles.keys()), set(['it'])) + self.assertEqual(md5(subtitles['it']), '4b3264186fbb103508abe5311cfcb9cd') + class TestVikiSubtitles(BaseTestSubtitles): url = 'http://www.viki.com/videos/1060846v-punch-episode-18' |