diff options
author | Sergey M․ <[email protected]> | 2015-07-10 00:25:36 +0600 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2015-07-10 00:25:36 +0600 |
commit | e6c2d9ad29bcc4eaa0eed03d3852588b6c7a10c0 (patch) | |
tree | 0fdc20acb0b97a43d1d4155f4122bdd6e11d0164 /youtube_dl/extractor/myvi.py | |
parent | 83423254ccdf60cb8756aaf7900c929c1cf1a3ef (diff) | |
download | youtube-dl-e6c2d9ad29bcc4eaa0eed03d3852588b6c7a10c0.tar.gz youtube-dl-e6c2d9ad29bcc4eaa0eed03d3852588b6c7a10c0.zip |
[extractor/generic:myvi] Add support for myvi embeds
Diffstat (limited to 'youtube_dl/extractor/myvi.py')
-rw-r--r-- | youtube_dl/extractor/myvi.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/myvi.py b/youtube_dl/extractor/myvi.py index a14a5365b..896080c1e 100644 --- a/youtube_dl/extractor/myvi.py +++ b/youtube_dl/extractor/myvi.py @@ -1,6 +1,8 @@ # coding: utf-8 from __future__ import unicode_literals +import re + from .vimple import SprutoBaseIE @@ -38,6 +40,13 @@ class MyviEmbedIE(SprutoBaseIE): '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) + if mobj: + return mobj.group('url') + def _real_extract(self, url): video_id = self._match_id(url) |