]> 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 b1e38e7e9ef29d4fa5bbabcecabec26bfce4bad6..17f1e5fab9df746ac974917b14ca2e75a0c44f45 100644 (file)
@@ -42,6 +42,8 @@ from youtube_dl.extractor import (
     ToypicsUserIE,
     XTubeUserIE,
     InstagramUserIE,
+    CSpanIE,
+    AolIE,
 )
 
 
@@ -309,9 +311,33 @@ class TestPlaylists(unittest.TestCase):
             'thumbnail': 're:^https?://.*\.jpg',
             'uploader': 'Porsche',
             'uploader_id': 'porsche',
+            'timestamp': 1387486713,
+            'upload_date': '20131219',
         }
         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()