diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-07-10 00:27:02 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-07-10 00:27:02 +0600 |
commit | f2f89c762a13392e8876c5e9dff8b418c3912ac6 (patch) | |
tree | 32d06ce21d32d587adda94a81b8d6ae662724da5 /youtube_dl | |
parent | e6c2d9ad29bcc4eaa0eed03d3852588b6c7a10c0 (diff) |
[myvi:embed] Improve _VALID_URL
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/myvi.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/myvi.py b/youtube_dl/extractor/myvi.py index 896080c1e..cd80cc177 100644 --- a/youtube_dl/extractor/myvi.py +++ b/youtube_dl/extractor/myvi.py @@ -13,11 +13,12 @@ class MyviEmbedIE(SprutoBaseIE): (?: (?: embed/html| + flash| api/Video/Get )/| content/preloader\.swf\?.*\bid= ) - (?P<id>[\da-zA-Z_]+) + (?P<id>[\da-zA-Z_-]+) ''' _TESTS = [{ 'url': 'http://myvi.ru/player/embed/html/oOy4euHA6LVwNNAjhD9_Jq5Ha2Qf0rtVMVFMAZav8wObeRTZaCATzucDQIDph8hQU0', @@ -38,12 +39,15 @@ class MyviEmbedIE(SprutoBaseIE): }, { 'url': 'http://myvi.tv/embed/html/oTGTNWdyz4Zwy_u1nraolwZ1odenTd9WkTnRfIL9y8VOgHYqOHApE575x4_xxS9Vn0?ap=0', 'only_matching': True, + }, { + 'url': 'http://myvi.ru/player/flash/ocp2qZrHI-eZnHKQBK4cZV60hslH8LALnk0uBfKsB-Q4WnY26SeGoYPi8HWHxu0O30', + 'only_matching': True, }] @classmethod def _extract_url(cls, webpage): mobj = re.search( - r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//myvi\.(?:ru/player|tv)/embed/html/[^"]+)\1', webpage) + r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//myvi\.(?:ru/player|tv)/(?:embed/html|flash)/[^"]+)\1', webpage) if mobj: return mobj.group('url') |