X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcinemassacre.py;h=f0d08cebfce87b006b339508f655eba95a4bc1ef;hb=2b35c9ef742bf261078ea10c6c0bba848db1a0df;hp=8260e81928307c67d9d7176ea787cfe56b2c2e78;hpb=fac6be2dd5c536ec9ee6ecc28fac0066905a6865;p=youtube-dl diff --git a/youtube_dl/extractor/cinemassacre.py b/youtube_dl/extractor/cinemassacre.py index 8260e8192..f0d08cebf 100644 --- a/youtube_dl/extractor/cinemassacre.py +++ b/youtube_dl/extractor/cinemassacre.py @@ -12,7 +12,6 @@ class CinemassacreIE(InfoExtractor): _TESTS = [{ u'url': u'http://cinemassacre.com/2012/11/10/avgn-the-movie-trailer/', u'file': u'19911.flv', - u'md5': u'f9bb7ede54d1229c9846e197b4737e06', u'info_dict': { u'upload_date': u'20121110', u'title': u'“Angry Video Game Nerd: The Movie” – Trailer', @@ -26,7 +25,6 @@ class CinemassacreIE(InfoExtractor): { u'url': u'http://cinemassacre.com/2013/10/02/the-mummys-hand-1940', u'file': u'521be8ef82b16.flv', - u'md5': u'91b248e1e2473d5bff55d6010518111f', u'info_dict': { u'upload_date': u'20131002', u'title': u'The Mummy’s Hand (1940)', @@ -43,7 +41,7 @@ class CinemassacreIE(InfoExtractor): webpage_url = u'http://' + mobj.group('url') webpage = self._download_webpage(webpage_url, None) # Don't know video id yet video_date = mobj.group('date_Y') + mobj.group('date_m') + mobj.group('date_d') - mobj = re.search(r'src="(?Phttp://player\.screenwavemedia\.com/play/(?:embed|player)\.php\?id=(?:Cinemassacre-)?(?P.+?))"', webpage) + mobj = re.search(r'src="(?Phttp://player\.screenwavemedia\.com/play/[a-zA-Z]+\.php\?id=(?:Cinemassacre-)?(?P.+?))"', webpage) if not mobj: raise ExtractorError(u'Can\'t extract embed url and video id') playerdata_url = mobj.group(u'embed_url') @@ -58,8 +56,6 @@ class CinemassacreIE(InfoExtractor): playerdata = self._download_webpage(playerdata_url, video_id) url = self._html_search_regex(r'\'streamer\': \'(?P[^\']+)\'', playerdata, u'url') - player_url = self._html_search_regex(r'\'flashplayer\': \'(?P[^\']+)\'', playerdata, u'player_url') - page_url = re.split(r'(?<=[^/])/([^/]|$)', player_url)[0] sd_file = self._html_search_regex(r'\'file\': \'(?P[^\']+)\'', playerdata, u'sd_file') hd_file = self._html_search_regex(r'\'?file\'?: "(?P[^"]+)"', playerdata, u'hd_file') @@ -68,25 +64,23 @@ class CinemassacreIE(InfoExtractor): formats = [ { 'url': url, - 'player_url': player_url, - 'page_url': page_url, 'play_path': 'mp4:' + sd_file, + 'rtmp_live': True, # workaround 'ext': 'flv', 'format': 'sd', 'format_id': 'sd', }, { 'url': url, - 'player_url': player_url, - 'page_url': page_url, 'play_path': 'mp4:' + hd_file, + 'rtmp_live': True, # workaround 'ext': 'flv', 'format': 'hd', 'format_id': 'hd', }, ] - info = { + return { 'id': video_id, 'title': video_title, 'formats': formats, @@ -94,6 +88,3 @@ class CinemassacreIE(InfoExtractor): 'upload_date': video_date, 'thumbnail': video_thumbnail, } - # TODO: Remove when #980 has been merged - info.update(formats[-1]) - return info