From c6279f6d9ddeb88f2d8091c85dfd3b8a4b21f587 Mon Sep 17 00:00:00 2001 From: rzhxeo Date: Sat, 19 Oct 2013 17:41:18 +0200 Subject: [PATCH] [CinemassacreIE] Add tc_url to extracted info and fix wrong if statement --- youtube_dl/extractor/cinemassacre.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/cinemassacre.py b/youtube_dl/extractor/cinemassacre.py index a736c66e9..ca67e8cea 100644 --- a/youtube_dl/extractor/cinemassacre.py +++ b/youtube_dl/extractor/cinemassacre.py @@ -59,7 +59,7 @@ 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') - if playerdata.find('hd: { file:'): + if playerdata.find('hd: { file:') != -1: page_url = 'http://cinemassacre.com' else: page_url = re.split(r'(?<=[^/])/([^/]|$)', player_url)[0] @@ -73,6 +73,7 @@ class CinemassacreIE(InfoExtractor): 'player_url': player_url, 'page_url': page_url, 'play_path': 'mp4:' + sd_file, + 'tc_url': url, 'ext': 'flv', 'format': 'sd', 'format_id': 'sd', @@ -82,6 +83,7 @@ class CinemassacreIE(InfoExtractor): 'player_url': player_url, 'page_url': page_url, 'play_path': 'mp4:' + hd_file, + 'tc_url': url, 'ext': 'flv', 'format': 'hd', 'format_id': 'hd',