]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - test/test_playlists.py
[canalplus] Prefer f4m and modernize (Closes #2749)
[youtube-dl.git] / test / test_playlists.py
index 4af38632e7573b063418b2d0372bb1820533851f..17f1e5fab9df746ac974917b14ca2e75a0c44f45 100644 (file)
@@ -42,6 +42,8 @@ from youtube_dl.extractor import (
     ToypicsUserIE,
     XTubeUserIE,
     InstagramUserIE,
+    CSpanIE,
+    AolIE,
 )
 
 
@@ -314,6 +316,28 @@ class TestPlaylists(unittest.TestCase):
         }
         expect_info_dict(self, EXPECTED, test_video)
 
+    def test_CSpan_playlist(self):
+        dl = FakeYDL()
+        ie = CSpanIE(dl)
+        result = ie.extract(
+            'http://www.c-span.org/video/?318608-1/gm-ignition-switch-recall')
+        self.assertIsPlaylist(result)
+        self.assertEqual(result['id'], '342759')
+        self.assertEqual(
+            result['title'], 'General Motors Ignition Switch Recall')
+        whole_duration = sum(e['duration'] for e in result['entries'])
+        self.assertEqual(whole_duration, 14855)
+
+    def test_aol_playlist(self):
+        dl = FakeYDL()
+        ie = AolIE(dl)
+        result = ie.extract(
+            'http://on.aol.com/playlist/brace-yourself---todays-weirdest-news-152147?icid=OnHomepageC4_Omg_Img#_videoid=518184316')
+        self.assertIsPlaylist(result)
+        self.assertEqual(result['id'], '152147')
+        self.assertEqual(
+            result['title'], 'Brace Yourself - Today\'s Weirdest News')
+        self.assertTrue(len(result['entries']) >= 10)
 
 if __name__ == '__main__':
     unittest.main()