X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fcomedycentral.py;h=40870cb861b88d70db5c8ac6f7fa57c5861c53c5;hb=b6cfde99b7e4ddd16123a1fbc6173c05d691415c;hp=60c0a4f5dbc3c98468a184195e03dd39da299e95;hpb=43f775e4cade8868cda32bc71e3d84ed62665c58;p=youtube-dl.git diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index 60c0a4f5d..40870cb86 100644 --- a/youtube_dl/extractor/comedycentral.py +++ b/youtube_dl/extractor/comedycentral.py @@ -43,11 +43,13 @@ class ComedyCentralShowsIE(InfoExtractor): (?Pthedailyshow|thecolbertreport)\.(?:cc\.)?com/ (full-episodes/(?P.*)| (?P - (the-colbert-report-(videos|collections)/(?P[0-9]+)/[^/]*/(?P.*?)) - |(watch/(?P[^/]*)/(?P.*)))| + (?:videos/[^/]+/(?P[^/?#]+)) + |(the-colbert-report-(videos|collections)/(?P[0-9]+)/[^/]*/(?P.*?)) + |(watch/(?P[^/]*)/(?P.*)) + )| (?P extended-interviews/(?P[0-9a-z]+)/(?:playlist_tds_extended_)?(?P.*?)(/.*?)?))) - $''' + (?:[?#].*|$)''' _TEST = { 'url': 'http://thedailyshow.cc.com/watch/thu-december-13-2012/kristen-stewart', 'md5': '4e2f5cb088a83cd8cdb7756132f9739d', @@ -57,7 +59,7 @@ class ComedyCentralShowsIE(InfoExtractor): 'upload_date': '20121213', 'description': 'Kristen Stewart learns to let loose in "On the Road."', 'uploader': 'thedailyshow', - 'title': 'thedailyshow-kristen-stewart part 1', + 'title': 'thedailyshow kristen-stewart part 1', } } @@ -102,7 +104,9 @@ class ComedyCentralShowsIE(InfoExtractor): assert mobj is not None if mobj.group('clip'): - if mobj.group('showname') == 'thedailyshow': + if mobj.group('videotitle'): + epTitle = mobj.group('videotitle') + elif mobj.group('showname') == 'thedailyshow': epTitle = mobj.group('tdstitle') else: epTitle = mobj.group('cntitle') @@ -161,7 +165,7 @@ class ComedyCentralShowsIE(InfoExtractor): content = itemEl.find('.//{http://search.yahoo.com/mrss/}content') duration = float_or_none(content.attrib.get('duration')) mediagen_url = content.attrib['url'] - guid = itemEl.find('.//guid').text.rpartition(':')[-1] + guid = itemEl.find('./guid').text.rpartition(':')[-1] cdoc = self._download_xml( mediagen_url, epTitle,