summaryrefslogtreecommitdiffhomepage
path: root/test/test_download.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2012-11-30 08:42:11 +0100
committerPhilipp Hagemeister <[email protected]>2012-11-30 08:42:11 +0100
commitd78be7e331f3f859f770a37a33286d42680114e7 (patch)
tree87eb1f72f84ff83df463589978018a9014988ad6 /test/test_download.py
parent15c8d83358a964e8e5d12f1d0c55fe96fc111a01 (diff)
downloadyoutube-dl-d78be7e331f3f859f770a37a33286d42680114e7.tar.gz
youtube-dl-d78be7e331f3f859f770a37a33286d42680114e7.zip
Add test for Youku (Mentioned in #314)
Diffstat (limited to 'test/test_download.py')
-rw-r--r--test/test_download.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_download.py b/test/test_download.py
index 571fbe9ad..c1f6ea556 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -147,6 +147,16 @@ class DownloadTest(unittest.TestCase):
md5_for_file = _file_md5(filename)
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):
if os.path.exists('BaW_jenozKc.mp4'):
@@ -167,6 +177,8 @@ class DownloadTest(unittest.TestCase):
# No file specified for CollegeHumor
if os.path.exists('1135332.flv'):
os.remove('1135332.flv')
+ if os.path.exists('XNDgyMDQ2NTQw_part00.flv'):
+ os.remove('XNDgyMDQ2NTQw_part00.flv')