[novamov] Add embedded player support
authordst <dstftw@gmail.com>
Wed, 8 Jan 2014 01:07:11 +0000 (08:07 +0700)
committerdst <dstftw@gmail.com>
Wed, 8 Jan 2014 01:09:13 +0000 (08:09 +0700)
youtube_dl/extractor/generic.py
youtube_dl/extractor/novamov.py

index 70001f87d7b5d7734a228feb80b6d2a45a92c174..e156421071435b4287bdd15a05a0f89ae73563fe 100644 (file)
@@ -311,6 +311,12 @@ class GenericIE(InfoExtractor):
         mobj = re.search(r'<iframe .*?src="(http://mpora\.com/videos/[^"]+)"', webpage)
         if mobj is not None:
             return self.url_result(mobj.group(1), 'Mpora')
+        
+        # Look for embedded Novamov player
+        mobj = re.search(
+            r'<iframe[^>]+?src=(["\'])(?P<url>http://(?:(?:embed|www)\.)?novamov\.com/embed\.php.+?)\1', webpage)
+        if mobj is not None:
+            return self.url_result(mobj.group('url'), 'Novamov')
 
         # Start with something easy: JW Player in SWFObject
         mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage)
index 50e3233ce4445104111015391a1f6e1617ad91e4..48ee00da3dbc0c75a5a5b09c8d7b2faf7e0a6ceb 100644 (file)
@@ -10,7 +10,7 @@ from ..utils import (
 
 
 class NovamovIE(InfoExtractor):
-    _VALID_URL = r'http://(?:www\.novamov\.com/video/|embed\.novamov\.com/embed\.php\?v=)(?P<videoid>[a-z\d]{13})'
+    _VALID_URL = r'http://(?:(?:www\.)?novamov\.com/video/|(?:(?:embed|www)\.)novamov\.com/embed\.php\?v=)(?P<videoid>[a-z\d]{13})'
 
     _TEST = {
         'url': 'http://www.novamov.com/video/4rurhn9x446jj',