X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcomedycentral.py;h=60c0a4f5dbc3c98468a184195e03dd39da299e95;hb=986f56736b4b51bab1bdea88883a33416cb0dede;hp=483ae576149de801edb23a570f6fa48ef1a8a726;hpb=34cbc7ee8db36e85d2021455f468c5dc2da616b8;p=youtube-dl.git diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index 483ae5761..60c0a4f5d 100644 --- a/youtube_dl/extractor/comedycentral.py +++ b/youtube_dl/extractor/comedycentral.py @@ -8,7 +8,7 @@ from ..utils import ( compat_str, compat_urllib_parse, ExtractorError, - int_or_none, + float_or_none, unified_strdate, ) @@ -46,7 +46,7 @@ class ComedyCentralShowsIE(InfoExtractor): (the-colbert-report-(videos|collections)/(?P[0-9]+)/[^/]*/(?P.*?)) |(watch/(?P[^/]*)/(?P.*)))| (?P - extended-interviews/(?P[0-9]+)/playlist_tds_extended_(?P.*?)/.*?))) + extended-interviews/(?P[0-9a-z]+)/(?:playlist_tds_extended_)?(?P.*?)(/.*?)?))) $''' _TEST = { 'url': 'http://thedailyshow.cc.com/watch/thu-december-13-2012/kristen-stewart', @@ -134,7 +134,7 @@ class ComedyCentralShowsIE(InfoExtractor): # a URL prefix; so extract the alternate reference # and then add the URL prefix manually. - altMovieParams = re.findall('data-mgid="([^"]*(?:episode|video).*?:.*?)"', webpage) + altMovieParams = re.findall('data-mgid="([^"]*(?:episode|video|playlist).*?:.*?)"', webpage) if len(altMovieParams) == 0: raise ExtractorError('unable to find Flash URL in webpage ' + url) else: @@ -159,7 +159,7 @@ class ComedyCentralShowsIE(InfoExtractor): thumbnail = itemEl.find('.//{http://search.yahoo.com/mrss/}thumbnail').attrib.get('url') content = itemEl.find('.//{http://search.yahoo.com/mrss/}content') - duration = int_or_none(content.attrib.get('duration')) + duration = float_or_none(content.attrib.get('duration')) mediagen_url = content.attrib['url'] guid = itemEl.find('.//guid').text.rpartition(':')[-1]