[comedycentral] Match more URLs
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 9 Apr 2014 09:43:13 +0000 (11:43 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 9 Apr 2014 09:43:15 +0000 (11:43 +0200)
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
youtube_dl/extractor/comedycentral.py

index 577f6ac32c35997ac90e157a39e8cea228f2fa37..479d21b054bca5203c362954a06bbee56131ef60 100644 (file)
@@ -156,6 +156,15 @@ class TestAllURLsMatching(unittest.TestCase):
         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
index 0c99887a2e4ef7f3d1b2a75f605553119da16b3b..c5203a273eae35a462a6565d750f68d2ef999a37 100644 (file)
@@ -41,9 +41,9 @@ class ComedyCentralShowsIE(InfoExtractor):
     _VALID_URL = r'''(?x)^(:(?P<shortname>tds|thedailyshow|cr|colbert|colbertnation|colbertreport)
                       |https?://(:www\.)?
                           (?P<showname>thedailyshow|thecolbertreport)\.(?:cc\.)?com/
-                         (full-episodes/(?:[0-9a-z]{6}/)?(?P<episode>.*)|
+                         ((?:full-)?episodes/(?:[0-9a-z]{6}/)?(?P<episode>.*)|
                           (?P<clip>
-                              (?:(?:guests/[^/]+|videos)/[^/]+/(?P<videotitle>[^/?#]+))
+                              (?:(?:guests/[^/]+|videos|video-playlists)/[^/]+/(?P<videotitle>[^/?#]+))
                               |(the-colbert-report-(videos|collections)/(?P<clipID>[0-9]+)/[^/]*/(?P<cntitle>.*?))
                               |(watch/(?P<date>[^/]*)/(?P<tdstitle>.*))
                           )|