From d09d117870811e4b2465713b3b562c1c50349961 Mon Sep 17 00:00:00 2001 From: pishposhmcgee Date: Wed, 17 Dec 2014 17:09:33 -0600 Subject: [PATCH] Fixed regex for Colbert Report playlist clips Previously the regex would match for playlists but not for individual clips accessed as part of the playlist. Previously working: http://thecolbertreport.cc.com/video-playlists/xi35i8/colbert-report-04091 Previously not working: http://thecolbertreport.cc.com/video-playlists/xi35i8/colbert-report-04091/2uxo91 --- youtube_dl/extractor/comedycentral.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index 8d27af5e5..62ad4ca31 100644 --- a/youtube_dl/extractor/comedycentral.py +++ b/youtube_dl/extractor/comedycentral.py @@ -44,13 +44,14 @@ class ComedyCentralShowsIE(MTVServicesInfoExtractor): (?Pthedailyshow|thecolbertreport)\.(?:cc\.)?com/ ((?:full-)?episodes/(?:[0-9a-z]{6}/)?(?P.*)| (?P - (?:(?:guests/[^/]+|videos|video-playlists|special-editions|news-team/[^/]+)/[^/]+/(?P[^/?#]+)) + (?:(?:guests/[^/]+|videos|special-editions|news-team/[^/]+)/[^/]+/(?P[^/?#]+)) + |video-playlists/[^/?#]+/(?P[^/?#]+)(/[^/?#]+)? |(the-colbert-report-(videos|collections)/(?P[0-9]+)/[^/]*/(?P.*?)) |(watch/(?P[^/]*)/(?P.*)) )| (?P extended-interviews/(?P[0-9a-z]+)/(?:playlist_tds_extended_)?(?P.*?)(/.*?)?))) - ''' + (?:[?#].*|$)''' _TESTS = [{ 'url': 'http://thedailyshow.cc.com/watch/thu-december-13-2012/kristen-stewart', 'md5': '4e2f5cb088a83cd8cdb7756132f9739d', @@ -129,6 +130,9 @@ class ComedyCentralShowsIE(MTVServicesInfoExtractor): epTitle = mobj.group('videotitle') elif mobj.group('showname') == 'thedailyshow': epTitle = mobj.group('tdstitle') + elif mobj.group('playlistName'): + epTitle = mobj.group('playlistName') + dlNewest = False else: epTitle = mobj.group('cntitle') dlNewest = False