diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2012-11-27 14:55:18 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2012-11-27 14:55:18 +0100 |
commit | fa59f4b6a9df03d1156dd2d274295a7b3d75c059 (patch) | |
tree | 3c1ea076343a2b499faae5b4046c4a6168711998 | |
parent | 6bac102a4dc49a1e92eb4e37eff61d1216915c44 (diff) | |
parent | 4a702f381924476511d1d73d2de15b272332f27b (diff) |
Merge remote-tracking branch 'chrisjrn/master'
-rw-r--r-- | youtube_dl/InfoExtractors.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 1ac05523a..13b04ab5b 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -2331,10 +2331,19 @@ class ComedyCentralIE(InfoExtractor): epTitle = mobj.group('episode') mMovieParams = re.findall('(?:<param name="movie" value="|var url = ")(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"', html) + if len(mMovieParams) == 0: - self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url) - return + # The Colbert Report embeds the information in a without + # a URL prefix; so extract the alternate reference + # and then add the URL prefix manually. + altMovieParams = re.findall('data-mgid="([^"]*episode.*?:.*?)"', html) + if len(altMovieParams) == 0: + self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url) + return + else: + mMovieParams = [("http://media.mtvnservices.com/" + altMovieParams[0], altMovieParams[0])] + playerUrl_raw = mMovieParams[0][0] self.report_player_url(epTitle) try: |