Fix tests for metacafe ffilter
This reverts commit 9d87eb84b9508b497372ee350985bb21afd5d550.
This commit is contained in:
parent
9d87eb84b9
commit
1c70f6cb64
@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import unittest
|
|
||||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
||||||
|
|
||||||
from test.helper import try_rm
|
|
||||||
|
|
||||||
from youtube_dl import YoutubeDL
|
|
||||||
|
|
||||||
class TestMetacafeFFilter(unittest.TestCase):
|
|
||||||
def test_metacafe(self):
|
|
||||||
filename = '2155630.mp4'
|
|
||||||
url = 'http://www.metacafe.com/watch/2155630/adult_art_by_david_hart_156/'
|
|
||||||
|
|
||||||
params = {
|
|
||||||
'skip_download': True,
|
|
||||||
'writeinfojson': True,
|
|
||||||
'outtmpl': '%(id)s.%(ext)s',
|
|
||||||
}
|
|
||||||
ydl = YoutubeDL(params)
|
|
||||||
ydl.add_default_info_extractors()
|
|
||||||
json_filename = os.path.splitext(filename)[0] + '.info.json'
|
|
||||||
try_rm(json_filename)
|
|
||||||
ydl.download([url])
|
|
||||||
res = os.path.exists(json_filename)
|
|
||||||
try_rm(json_filename)
|
|
||||||
self.assertTrue(res)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
@ -50,6 +50,19 @@ class MetacafeIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
'skip': 'Page is temporarily unavailable.',
|
'skip': 'Page is temporarily unavailable.',
|
||||||
},
|
},
|
||||||
|
# metacafe video with family filter
|
||||||
|
{
|
||||||
|
'url': 'http://www.metacafe.com/watch/2155630/adult_art_by_david_hart_156/',
|
||||||
|
'md5': 'be6fe1f53864593349158bed94aae3a2',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '2155630',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Adult Art By David Hart #156',
|
||||||
|
'uploader': 'hartistry',
|
||||||
|
'description': 'Adult Art By David Hart. All the Art Works presented here are not in the possession of the American Artist, David John Hart. The paintings are in collections worldwide of individuals, countries, art museums, foundations and charities.',
|
||||||
|
},
|
||||||
|
'skip': 'Page is temporarily unavailable.',
|
||||||
|
},
|
||||||
# AnyClip video
|
# AnyClip video
|
||||||
{
|
{
|
||||||
'url': 'http://www.metacafe.com/watch/an-dVVXnuY7Jh77J/the_andromeda_strain_1971_stop_the_bomb_part_3/',
|
'url': 'http://www.metacafe.com/watch/an-dVVXnuY7Jh77J/the_andromeda_strain_1971_stop_the_bomb_part_3/',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user