Add test for Youku (Mentioned in #314)
This commit is contained in:
parent
15c8d83358
commit
d78be7e331
@ -147,6 +147,16 @@ class DownloadTest(unittest.TestCase):
|
|||||||
md5_for_file = _file_md5(filename)
|
md5_for_file = _file_md5(filename)
|
||||||
self.assertEqual(md5_for_file, 'c5c67df477eb0d9b058200351448ba4c')
|
self.assertEqual(md5_for_file, 'c5c67df477eb0d9b058200351448ba4c')
|
||||||
|
|
||||||
|
@_skip_unless(youtube_dl.InfoExtractors.YoukuIE._WORKING, "IE marked as not _WORKING")
|
||||||
|
def test_Youku(self):
|
||||||
|
filename = 'XNDgyMDQ2NTQw_part00.flv'
|
||||||
|
fd = FileDownloader(self.parameters)
|
||||||
|
fd.add_info_extractor(youtube_dl.InfoExtractors.YoukuIE())
|
||||||
|
fd.download(['http://v.youku.com/v_show/id_XNDgyMDQ2NTQw.html'])
|
||||||
|
self.assertTrue(os.path.exists(filename))
|
||||||
|
md5_for_file = _file_md5(filename)
|
||||||
|
self.assertEqual(md5_for_file, 'ffe3f2e435663dc2d1eea34faeff5b5b')
|
||||||
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
if os.path.exists('BaW_jenozKc.mp4'):
|
if os.path.exists('BaW_jenozKc.mp4'):
|
||||||
@ -167,6 +177,8 @@ class DownloadTest(unittest.TestCase):
|
|||||||
# No file specified for CollegeHumor
|
# No file specified for CollegeHumor
|
||||||
if os.path.exists('1135332.flv'):
|
if os.path.exists('1135332.flv'):
|
||||||
os.remove('1135332.flv')
|
os.remove('1135332.flv')
|
||||||
|
if os.path.exists('XNDgyMDQ2NTQw_part00.flv'):
|
||||||
|
os.remove('XNDgyMDQ2NTQw_part00.flv')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,10 +54,16 @@
|
|||||||
"url": "http://www.collegehumor.com/video/6830834/mitt-romney-style-gangnam-style-parody",
|
"url": "http://www.collegehumor.com/video/6830834/mitt-romney-style-gangnam-style-parody",
|
||||||
"file": ""
|
"file": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "XNXX",
|
"name": "XNXX",
|
||||||
"md5": "c5c67df477eb0d9b058200351448ba4c",
|
"md5": "c5c67df477eb0d9b058200351448ba4c",
|
||||||
"url": "http://video.xnxx.com/video1135332/lida_naked_funny_actress_5_",
|
"url": "http://video.xnxx.com/video1135332/lida_naked_funny_actress_5_",
|
||||||
"file": "1135332.flv"
|
"file": "1135332.flv"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Youku",
|
||||||
|
"url": "http://v.youku.com/v_show/id_XNDgyMDQ2NTQw.html",
|
||||||
|
"file": "XNDgyMDQ2NTQw_part00.flv",
|
||||||
|
"md5": "ffe3f2e435663dc2d1eea34faeff5b5b"
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
Reference in New Issue
Block a user