diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-07-23 18:37:09 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-07-23 18:37:09 +0200 |
commit | a9c0f9bc63dd2a6a132a21f698da6ccb9050fb31 (patch) | |
tree | 3bd8a262087b8f9e64af5b6dbf43a98059dd7387 /youtube_dl/extractor/collegehumor.py | |
parent | b7cc9f50268f41656746009b6a6e8f5d5bf1cb7a (diff) | |
parent | 252580c5610cbeae4a3fb6fbd23ed532d6a273a0 (diff) |
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl/extractor/collegehumor.py')
-rw-r--r-- | youtube_dl/extractor/collegehumor.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/collegehumor.py b/youtube_dl/extractor/collegehumor.py index 5ad170d4f..4a0b0af5a 100644 --- a/youtube_dl/extractor/collegehumor.py +++ b/youtube_dl/extractor/collegehumor.py @@ -10,7 +10,7 @@ from ..utils import ( class CollegeHumorIE(InfoExtractor): - _VALID_URL = r'^(?:https?://)?(?:www\.)?collegehumor\.com/video/(?P<videoid>[0-9]+)/(?P<shorttitle>.*)$' + _VALID_URL = r'^(?:https?://)?(?:www\.)?collegehumor\.com/(video|embed)/(?P<videoid>[0-9]+)/(?P<shorttitle>.*)$' _TEST = { u'url': u'http://www.collegehumor.com/video/6902724/comic-con-cosplay-catastrophe', @@ -43,6 +43,9 @@ class CollegeHumorIE(InfoExtractor): mdoc = xml.etree.ElementTree.fromstring(metaXml) try: videoNode = mdoc.findall('./video')[0] + youtubeIdNode = videoNode.find('./youtubeID') + if youtubeIdNode is not None: + return self.url_result(youtubeIdNode.text, 'Youtube') info['description'] = videoNode.findall('./description')[0].text info['title'] = videoNode.findall('./caption')[0].text info['thumbnail'] = videoNode.findall('./thumbnail')[0].text |