From 29e3e682afd3a8a6bde0c5e8d7e3d0df75f17380 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Wed, 9 Apr 2014 11:43:13 +0200 Subject: [PATCH] [comedycentral] Match more URLs Looks like they only offer clips instead of full episodes now. We'll need to add new parsing code as well. --- test/test_all_urls.py | 9 +++++++++ youtube_dl/extractor/comedycentral.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/test_all_urls.py b/test/test_all_urls.py index 577f6ac32..479d21b05 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -156,6 +156,15 @@ def test_ComedyCentralShows(self): self.assertMatch( 'http://thedailyshow.cc.com/guests/michael-lewis/3efna8/exclusive---michael-lewis-extended-interview-pt--3', ['ComedyCentralShows']) + self.assertMatch( + 'http://thedailyshow.cc.com/episodes/sy7yv0/april-8--2014---denis-leary', + ['ComedyCentralShows']) + self.assertMatch( + 'http://thecolbertreport.cc.com/episodes/8ase07/april-8--2014---jane-goodall', + ['ComedyCentralShows']) + self.assertMatch( + 'http://thedailyshow.cc.com/video-playlists/npde3s/the-daily-show-19088-highlights', + ['ComedyCentralShows']) def test_yahoo_https(self): # https://github.com/rg3/youtube-dl/issues/2701 diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py index 0c99887a2..c5203a273 100644 --- a/youtube_dl/extractor/comedycentral.py +++ b/youtube_dl/extractor/comedycentral.py @@ -41,9 +41,9 @@ class ComedyCentralShowsIE(InfoExtractor): _VALID_URL = r'''(?x)^(:(?Ptds|thedailyshow|cr|colbert|colbertnation|colbertreport) |https?://(:www\.)? (?Pthedailyshow|thecolbertreport)\.(?:cc\.)?com/ - (full-episodes/(?:[0-9a-z]{6}/)?(?P.*)| + ((?:full-)?episodes/(?:[0-9a-z]{6}/)?(?P.*)| (?P - (?:(?:guests/[^/]+|videos)/[^/]+/(?P[^/?#]+)) + (?:(?:guests/[^/]+|videos|video-playlists)/[^/]+/(?P[^/?#]+)) |(the-colbert-report-(videos|collections)/(?P[0-9]+)/[^/]*/(?P.*?)) |(watch/(?P[^/]*)/(?P.*)) )|