]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/extractor/generic.py
Merge remote-tracking branch 'dstftw/novamov'
[youtube-dl.git] / youtube_dl / extractor / generic.py
index 2bfdf8f01f2ecd1659a8b0041f8ed06e9a54b73d..70001f87d7b5d7734a228feb80b6d2a45a92c174 100644 (file)
@@ -225,7 +225,8 @@ class GenericIE(InfoExtractor):
         bc_url = BrightcoveIE._extract_brightcove_url(webpage)
         if bc_url is not None:
             self.to_screen('Brightcove video detected.')
-            return self.url_result(bc_url, 'Brightcove')
+            surl = smuggle_url(bc_url, {'Referer': url})
+            return self.url_result(surl, 'Brightcove')
 
         # Look for embedded (iframe) Vimeo player
         mobj = re.search(
@@ -302,10 +303,15 @@ class GenericIE(InfoExtractor):
             return OoyalaIE._build_url_result(mobj.group(1))
 
         # Look for Aparat videos
-        mobj = re.search(r'<iframe src="(http://www.aparat.com/video/[^"]+)"', webpage)
+        mobj = re.search(r'<iframe src="(http://www\.aparat\.com/video/[^"]+)"', webpage)
         if mobj is not None:
             return self.url_result(mobj.group(1), 'Aparat')
 
+        # Look for MPORA videos
+        mobj = re.search(r'<iframe .*?src="(http://mpora\.com/videos/[^"]+)"', webpage)
+        if mobj is not None:
+            return self.url_result(mobj.group(1), 'Mpora')
+
         # Start with something easy: JW Player in SWFObject
         mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
         if mobj is None: