[extractor/generic:myvi] Add support for myvi embeds
This commit is contained in:
parent
83423254cc
commit
e6c2d9ad29
2 changed files with 15 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue