youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 16f4eb723a49d6ac7cacddf9678782f4704dff62
parent 1cbd4106201fe9b3890932c5a099892b0a05db19
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Tue,  1 Apr 2014 00:02:29 +0200

[comedycentral] Add support for /videos URLs (Fixes #2660)

Diffstat:
Mtest/test_all_urls.py | 7++++++-
Myoutube_dl/extractor/comedycentral.py | 7+++++--
2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/test/test_all_urls.py b/test/test_all_urls.py @@ -144,7 +144,12 @@ class TestAllURLsMatching(unittest.TestCase): self.assertMatch('http://video.pbs.org/widget/partnerplayer/980042464/', ['PBS']) def test_ComedyCentralShows(self): - self.assertMatch('http://thedailyshow.cc.com/extended-interviews/xm3fnq/andrew-napolitano-extended-interview', ['ComedyCentralShows']) + self.assertMatch( + 'http://thedailyshow.cc.com/extended-interviews/xm3fnq/andrew-napolitano-extended-interview', + ['ComedyCentralShows']) + self.assertMatch( + 'http://thecolbertreport.cc.com/videos/29w6fx/-realhumanpraise-for-fox-news', + ['ComedyCentralShows']) if __name__ == '__main__': unittest.main() diff --git a/youtube_dl/extractor/comedycentral.py b/youtube_dl/extractor/comedycentral.py @@ -43,7 +43,8 @@ class ComedyCentralShowsIE(InfoExtractor): (?P<showname>thedailyshow|thecolbertreport)\.(?:cc\.)?com/ (full-episodes/(?P<episode>.*)| (?P<clip> - (the-colbert-report-(videos|collections)/(?P<clipID>[0-9]+)/[^/]*/(?P<cntitle>.*?)) + (?:videos/[^/]+/(?P<videotitle>[^/?#]+)) + |(the-colbert-report-(videos|collections)/(?P<clipID>[0-9]+)/[^/]*/(?P<cntitle>.*?)) |(watch/(?P<date>[^/]*)/(?P<tdstitle>.*)))| (?P<interview> extended-interviews/(?P<interID>[0-9a-z]+)/(?:playlist_tds_extended_)?(?P<interview_title>.*?)(/.*?)?))) @@ -102,7 +103,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')