From c5a99c99cfc41e58e568dde1e14c83c60473a0bc Mon Sep 17 00:00:00 2001 From: kikuyan Date: Sun, 25 Jul 2021 15:27:04 +0900 Subject: [PATCH 1/2] [test/test_subtitles] update/skip some tests --- test/test_subtitles.py | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 550e0ca00..036b5ba1f 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -137,8 +137,8 @@ class TestTedSubtitles(BaseTestSubtitles): self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertTrue(len(subtitles.keys()) >= 28) - self.assertEqual(md5(subtitles['en']), '4262c1665ff928a2dada178f62cb8d14') - self.assertEqual(md5(subtitles['fr']), '66a63f7f42c97a50f8c0e90bc7797bb5') + self.assertEqual(md5(subtitles['en']), 'ee029dfbfb4c62f134389ffc159ba3cc') + self.assertEqual(md5(subtitles['fr']), '55f0cae9dde5b48e11464b266f35aa30') for lang in ['es', 'fr', 'de']: self.assertTrue(subtitles.get(lang) is not None, 'Subtitles for \'%s\' not extracted' % lang) @@ -152,8 +152,8 @@ class TestVimeoSubtitles(BaseTestSubtitles): self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['de', 'en', 'es', 'fr'])) - self.assertEqual(md5(subtitles['en']), '8062383cf4dec168fc40a088aa6d5888') - self.assertEqual(md5(subtitles['fr']), 'b6191146a6c5d3a452244d853fde6dc8') + self.assertEqual(md5(subtitles['en']), '386cbc9320b94e25cb364b97935e5dd1') + self.assertEqual(md5(subtitles['fr']), 'c9b69eef35bc6641c0d4da8a04f9dfac') def test_nosubtitles(self): self.DL.expect_warning('video doesn\'t have subtitles') @@ -169,6 +169,8 @@ class TestWallaSubtitles(BaseTestSubtitles): IE = WallaIE def test_allsubtitles(self): + print('Skipping TestWallaSubtitles, need new test url') + return self.DL.expect_warning('Automatic Captions not supported by this server') self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True @@ -177,6 +179,8 @@ class TestWallaSubtitles(BaseTestSubtitles): self.assertEqual(md5(subtitles['heb']), 'e758c5d7cb982f6bef14f377ec7a3920') def test_nosubtitles(self): + print('Skipping TestWallaSubtitles, need new test url') + return self.DL.expect_warning('video doesn\'t have subtitles') self.url = 'http://vod.walla.co.il/movie/2642630/one-direction-all-for-one' self.DL.params['writesubtitles'] = True @@ -189,6 +193,9 @@ class TestCeskaTelevizeSubtitles(BaseTestSubtitles): url = 'http://www.ceskatelevize.cz/ivysilani/10600540290-u6-uzasny-svet-techniky' IE = CeskaTelevizeIE + def getInfoDict(self): + return super(TestCeskaTelevizeSubtitles, self).getInfoDict()['entries'][0] + def test_allsubtitles(self): self.DL.expect_warning('Automatic Captions not supported by this server') self.DL.params['writesubtitles'] = True @@ -211,6 +218,8 @@ class TestLyndaSubtitles(BaseTestSubtitles): IE = LyndaIE def test_allsubtitles(self): + print('Skipping TestLyndaSubtitles, site moved to Linkedin') + return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() @@ -223,6 +232,8 @@ class TestNPOSubtitles(BaseTestSubtitles): IE = NPOIE def test_allsubtitles(self): + print('Skipping TestNPOSubtitles, extractor need fix') + return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() @@ -238,6 +249,8 @@ class TestMTVSubtitles(BaseTestSubtitles): return super(TestMTVSubtitles, self).getInfoDict()['entries'][0] def test_allsubtitles(self): + print('Skipping TestMTVSubtitles, need new test url') + return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() @@ -253,8 +266,8 @@ class TestNRKSubtitles(BaseTestSubtitles): self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() - self.assertEqual(set(subtitles.keys()), set(['no'])) - self.assertEqual(md5(subtitles['no']), '544fa917d3197fcbee64634559221cc2') + self.assertEqual(set(subtitles.keys()), set(['nb-ttv'])) + self.assertEqual(md5(subtitles['nb-ttv']), '67e06ff02d0deaf975e68f6cb8f6a149') class TestRaiPlaySubtitles(BaseTestSubtitles): @@ -308,6 +321,8 @@ class TestThePlatformFeedSubtitles(BaseTestSubtitles): IE = ThePlatformFeedIE def test_allsubtitles(self): + print('Skipping TestThePlatformFeedSubtitles, need new test url') + return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() @@ -338,7 +353,7 @@ class TestDemocracynowSubtitles(BaseTestSubtitles): self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['en'])) - self.assertEqual(md5(subtitles['en']), 'acaca989e24a9e45a6719c9b3d60815c') + self.assertEqual(md5(subtitles['en']), 'a3cc4c0b5eadd74d9974f1c1f5101045') def test_subtitles_in_page(self): self.url = 'http://www.democracynow.org/2015/7/3/this_flag_comes_down_today_bree' @@ -346,7 +361,7 @@ class TestDemocracynowSubtitles(BaseTestSubtitles): self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['en'])) - self.assertEqual(md5(subtitles['en']), 'acaca989e24a9e45a6719c9b3d60815c') + self.assertEqual(md5(subtitles['en']), 'a3cc4c0b5eadd74d9974f1c1f5101045') if __name__ == '__main__': From fbecc0c7662a67562888839570cd31a9fb103b7c Mon Sep 17 00:00:00 2001 From: kikuyan Date: Tue, 27 Jul 2021 09:29:45 +0900 Subject: [PATCH 2/2] [test/test_subtitles] update mtv npo tests --- test/test_subtitles.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 036b5ba1f..8b95c69c8 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -228,34 +228,30 @@ class TestLyndaSubtitles(BaseTestSubtitles): class TestNPOSubtitles(BaseTestSubtitles): - url = 'http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860' + url = 'https://www.npostart.nl/tegenlicht/25-02-2013/VPWON_1169289' IE = NPOIE def test_allsubtitles(self): - print('Skipping TestNPOSubtitles, extractor need fix') - return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['nl'])) - self.assertEqual(md5(subtitles['nl']), 'fc6435027572b63fb4ab143abd5ad3f4') + self.assertEqual(md5(subtitles['nl']), '6241cb42588b369b4f4b509b17cc885c') class TestMTVSubtitles(BaseTestSubtitles): - url = 'http://www.cc.com/video-clips/p63lk0/adam-devine-s-house-party-chasing-white-swans' + url = 'https://www.cc.com/video/5ke9v2/the-daily-show-with-trevor-noah-doc-rivers-and-steve-ballmer-the-nba-player-strike' IE = ComedyCentralIE def getInfoDict(self): return super(TestMTVSubtitles, self).getInfoDict()['entries'][0] def test_allsubtitles(self): - print('Skipping TestMTVSubtitles, need new test url') - return self.DL.params['writesubtitles'] = True self.DL.params['allsubtitles'] = True subtitles = self.getSubtitles() self.assertEqual(set(subtitles.keys()), set(['en'])) - self.assertEqual(md5(subtitles['en']), '78206b8d8a0cfa9da64dc026eea48961') + self.assertEqual(md5(subtitles['en']), 'a566bec478086b93fe20cccbdcea68e1') class TestNRKSubtitles(BaseTestSubtitles):