X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcomedycentral.py;h=60c0a4f5dbc3c98468a184195e03dd39da299e95;hb=986f56736b4b51bab1bdea88883a33416cb0dede;hp=346ecded62c9278e37f059afa5ab4f91f27b850d;hpb=865cbf4fc513bc4954cd32a64a4ed4c40c74f90a;p=youtube-dl.git diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index 346ecded6..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] @@ -191,7 +191,7 @@ class ComedyCentralShowsIE(InfoExtractor): }) self._sort_formats(formats) - virtual_id = show_name + '-' + epTitle + ' part ' + compat_str(part_num + 1) + virtual_id = show_name + ' ' + epTitle + ' part ' + compat_str(part_num + 1) entries.append({ 'id': guid, 'title': virtual_id, @@ -206,6 +206,6 @@ class ComedyCentralShowsIE(InfoExtractor): return { '_type': 'playlist', 'entries': entries, - 'title': title, + 'title': show_name + ' ' + title, 'description': description, }