From b2401d8e663ad307e27580df62d0000d0e2dcfd9 Mon Sep 17 00:00:00 2001 From: gcmalloc Date: Thu, 25 Oct 2012 17:15:56 +0200 Subject: [PATCH] adding youtube user --- test/test_download.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/test_download.py b/test/test_download.py index d1d6b119b..584e0d7c0 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -10,6 +10,7 @@ from youtube_dl.InfoExtractors import MetacafeIE, BlipTVIE from youtube_dl.InfoExtractors import XVideosIE, VimeoIE from youtube_dl.InfoExtractors import SoundcloudIE, StanfordOpenClassroomIE from youtube_dl.InfoExtractors import CollegeHumorIE, XNXXIE +from youtube_dl.InfoExtractors import YoutubeUserIE class DownloadTest(unittest.TestCase): @@ -21,6 +22,8 @@ class DownloadTest(unittest.TestCase): YOUTUBE_URL = "http://www.youtube.com/watch?v=BaW_jenozKc" YOUTUBE_FILE = "BaW_jenozKc.mp4" + YOUTUBEUSER_URL = "http://www.youtube.com/user/phihag" + DAILYMOTION_MD5 = "d363a50e9eb4f22ce90d08d15695bb47" DAILYMOTION_URL = "http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech" DAILYMOTION_FILE = "x33vw9.mp4" @@ -70,6 +73,15 @@ class DownloadTest(unittest.TestCase): self.assertTrue(os.path.exists(DownloadTest.YOUTUBE_FILE)) self.assertEqual(os.path.getsize(DownloadTest.YOUTUBE_FILE), DownloadTest.YOUTUBE_SIZE) + def test_youtubeuser(self): + with open(DownloadTest.PARAMETERS_FILE) as f: + fd = FileDownloader(json.load(f)) + fd.add_info_extractor(YoutubeUserIE()) + fd.add_info_extractor(YoutubeIE()) + fd.download([DownloadTest.YOUTUBEUSER_URL]) + self.assertTrue(os.path.exists(DownloadTest.YOUTUBE_FILE)) + self.assertEqual(os.path.getsize(DownloadTest.YOUTUBE_FILE), DownloadTest.YOUTUBE_SIZE) + def test_dailymotion(self): with open(DownloadTest.PARAMETERS_FILE) as f: fd = FileDownloader(json.load(f)) @@ -120,7 +132,6 @@ class DownloadTest(unittest.TestCase): def test_vimeo2(self): #skipped for the moment produce an error - return with open(DownloadTest.PARAMETERS_FILE) as f: fd = FileDownloader(json.load(f)) fd.add_info_extractor(VimeoIE())