1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-17 22:55:42 +07:00

[ted] Fix playlist extraction and add a test

This commit is contained in:
Jaime Marquínez Ferrándiz
2014-03-05 13:22:10 +01:00
parent 6dadaa9930
commit ca1fee34f2
2 changed files with 28 additions and 19 deletions

View File

@@ -36,6 +36,7 @@
RutubeChannelIE,
GoogleSearchIE,
GenericIE,
TEDIE,
)
@@ -259,5 +260,14 @@ def test_generic_rss_feed(self):
self.assertEqual(result['title'], 'Zero Punctuation')
self.assertTrue(len(result['entries']) > 10)
def test_ted_playlist(self):
dl = FakeYDL()
ie = TEDIE(dl)
result = ie.extract('http://www.ted.com/playlists/who_are_the_hackers')
self.assertIsPlaylist(result)
self.assertEqual(result['id'], '10')
self.assertEqual(result['title'], 'Who are the hackers?')
self.assertTrue(len(result['entries']) >= 6)
if __name__ == '__main__':
unittest.main()