[dailymotion] Correct test case

This commit is contained in:
Philipp Hagemeister 2014-08-27 19:20:20 +02:00
parent 4e408e479b
commit ce6815aad3

View file

@ -28,51 +28,53 @@ class DailymotionIE(DailymotionBaseInfoExtractor, SubtitlesInfoExtractor):
"""Information Extractor for Dailymotion""" """Information Extractor for Dailymotion"""
_VALID_URL = r'(?i)(?:https?://)?(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(embed|#)/)?video/(?P<id>[^/?_]+)' _VALID_URL = r'(?i)(?:https?://)?(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(embed|#)/)?video/(?P<id>[^/?_]+)'
IE_NAME = u'dailymotion' IE_NAME = 'dailymotion'
_FORMATS = [ _FORMATS = [
(u'stream_h264_ld_url', u'ld'), ('stream_h264_ld_url', 'ld'),
(u'stream_h264_url', u'standard'), ('stream_h264_url', 'standard'),
(u'stream_h264_hq_url', u'hq'), ('stream_h264_hq_url', 'hq'),
(u'stream_h264_hd_url', u'hd'), ('stream_h264_hd_url', 'hd'),
(u'stream_h264_hd1080_url', u'hd180'), ('stream_h264_hd1080_url', 'hd180'),
] ]
_TESTS = [ _TESTS = [
{ {
u'url': u'http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech', 'url': 'http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech',
u'file': u'x33vw9.mp4', 'md5': '392c4b85a60a90dc4792da41ce3144eb',
u'md5': u'392c4b85a60a90dc4792da41ce3144eb', 'info_dict': {
u'info_dict': { 'id': 'x33vw9',
u"uploader": u"Amphora Alex and Van .", 'ext': 'mp4',
u"title": u"Tutoriel de Youtubeur\"DL DES VIDEO DE YOUTUBE\"" 'uploader': 'Amphora Alex and Van .',
'title': 'Tutoriel de Youtubeur"DL DES VIDEO DE YOUTUBE"',
} }
}, },
# Vevo video # Vevo video
{ {
u'url': u'http://www.dailymotion.com/video/x149uew_katy-perry-roar-official_musi', 'url': 'http://www.dailymotion.com/video/x149uew_katy-perry-roar-official_musi',
u'file': u'USUV71301934.mp4', 'info_dict': {
u'info_dict': { 'title': 'Roar (Official)',
u'title': u'Roar (Official)', 'id': 'USUV71301934',
u'uploader': u'Katy Perry', 'ext': 'mp4',
u'upload_date': u'20130905', 'uploader': 'Katy Perry',
'upload_date': '20130905',
}, },
u'params': { 'params': {
u'skip_download': True, 'skip_download': True,
}, },
u'skip': u'VEVO is only available in some countries', 'skip': 'VEVO is only available in some countries',
}, },
# age-restricted video # age-restricted video
{ {
u'url': u'http://www.dailymotion.com/video/xyh2zz_leanna-decker-cyber-girl-of-the-year-desires-nude-playboy-plus_redband', 'url': 'http://www.dailymotion.com/video/xyh2zz_leanna-decker-cyber-girl-of-the-year-desires-nude-playboy-plus_redband',
u'file': u'xyh2zz.mp4', 'md5': '0d667a7b9cebecc3c89ee93099c4159d',
u'md5': u'0d667a7b9cebecc3c89ee93099c4159d', 'info_dict': {
u'info_dict': { 'id': 'xyh2zz',
u'title': 'Leanna Decker - Cyber Girl Of The Year Desires Nude [Playboy Plus]', 'ext': 'mp4',
u'uploader': 'HotWaves1012', 'title': 'Leanna Decker - Cyber Girl Of The Year Desires Nude [Playboy Plus]',
u'age_limit': 18, 'uploader': 'HotWaves1012',
'age_limit': 18,
} }
} }
] ]