aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-04-08 21:26:42 +0600
committerSergey M․ <dstftw@gmail.com>2016-04-08 21:26:42 +0600
commit56019444cb2fe64f0937fb52aff9e36f30b3b343 (patch)
tree616a6f564b2a299bc99ad3a09032a3d90720dcfb
parenta1ff3cd5f98980e37b5bdb1fd24cdba56ed6e618 (diff)
[novamov] Improve _VALID_URL template (Closes #9116)
-rw-r--r--youtube_dl/extractor/novamov.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/youtube_dl/extractor/novamov.py b/youtube_dl/extractor/novamov.py
index 5771a675d..3bbd47355 100644
--- a/youtube_dl/extractor/novamov.py
+++ b/youtube_dl/extractor/novamov.py
@@ -16,7 +16,14 @@ class NovaMovIE(InfoExtractor):
IE_NAME = 'novamov'
IE_DESC = 'NovaMov'
- _VALID_URL_TEMPLATE = r'http://(?:(?:www\.)?%(host)s/(?:file|video|mobile/#/videos)/|(?:(?:embed|www)\.)%(host)s/embed\.php\?(?:.*?&)?v=)(?P<id>[a-z\d]{13})'
+ _VALID_URL_TEMPLATE = r'''(?x)
+ http://
+ (?:
+ (?:www\.)?%(host)s/(?:file|video|mobile/\#/videos)/|
+ (?:(?:embed|www)\.)%(host)s/embed(?:\.php|/)?\?(?:.*?&)?\bv=
+ )
+ (?P<id>[a-z\d]{13})
+ '''
_VALID_URL = _VALID_URL_TEMPLATE % {'host': 'novamov\.com'}
_HOST = 'www.novamov.com'
@@ -189,7 +196,7 @@ class AuroraVidIE(NovaMovIE):
_FILE_DELETED_REGEX = r'This file no longer exists on our servers!<'
- _TEST = {
+ _TESTS = [{
'url': 'http://www.auroravid.to/video/4rurhn9x446jj',
'md5': '7205f346a52bbeba427603ba10d4b935',
'info_dict': {
@@ -199,4 +206,7 @@ class AuroraVidIE(NovaMovIE):
'description': 'search engine optimization is used to rank the web page in the google search engine'
},
'skip': '"Invalid token" errors abound (in web interface as well as youtube-dl, there is nothing we can do about it.)'
- }
+ }, {
+ 'url': 'http://www.auroravid.to/embed/?v=4rurhn9x446jj',
+ 'only_matching': True,
+ }]