]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/generic.py
Add an extractor for NBC news (closes #1320)
[youtube-dl.git] / youtube_dl / extractor / generic.py
index ccbbdd255588f5085b7c85cddc86863d8eeeabe3..d034a11bbc3c4cf7ad50edf19776b211296e8d60 100644 (file)
@@ -126,7 +126,7 @@ class GenericIE(InfoExtractor):
             raise ExtractorError(u'Invalid URL: %s' % url)
 
         self.report_extraction(video_id)
-        # Look for BrigthCove:
+        # Look for BrightCove:
         m_brightcove = re.search(r'<object.+?class=([\'"]).*?BrightcoveExperience.*?\1.+?</object>', webpage, re.DOTALL)
         if m_brightcove is not None:
             self.to_screen(u'Brightcove video detected.')
@@ -165,6 +165,8 @@ class GenericIE(InfoExtractor):
         video_url = compat_urllib_parse.unquote(mobj.group(1))
         if video_url.startswith('//'):
             video_url = compat_urllib_parse_urlparse(url).scheme + ':' + video_url
+        if '://' not in video_url:
+            video_url = url + ('' if url.endswith('/') else '/') + video_url
         video_id = os.path.basename(video_url)
 
         # here's a fun little line of code for you: