]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/collegehumor.py
Encrypted sig 87 broken again (fixes #1200)
[youtube-dl.git] / youtube_dl / extractor / collegehumor.py
index 5ad170d4f64b6025456eb7bcdc0128485cde3b76..30b9c7549f76c8d65dd4f18bcc5023b0c86160d9 100644 (file)
@@ -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|e)/(?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