aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordst <dstftw@gmail.com>2014-01-08 08:07:11 +0700
committerdst <dstftw@gmail.com>2014-01-08 08:09:13 +0700
commit8f89e68781c62f1173980dde06cdfefbd3020be5 (patch)
tree6369616ada3968aaa99d80f3ca9783210f66c75c
parent10bff13a6687527c2290c9345c50a337771a0bb1 (diff)
[novamov] Add embedded player support
-rw-r--r--youtube_dl/extractor/generic.py6
-rw-r--r--youtube_dl/extractor/novamov.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 70001f87d..e15642107 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -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)
diff --git a/youtube_dl/extractor/novamov.py b/youtube_dl/extractor/novamov.py
index 50e3233ce..48ee00da3 100644
--- a/youtube_dl/extractor/novamov.py
+++ b/youtube_dl/extractor/novamov.py
@@ -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',