[generic] Add support for rutube embeds

This commit is contained in:
Sergey M․ 2017-03-04 00:46:33 +07:00
parent bc82f22879
commit eb3079b6ce
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
2 changed files with 30 additions and 0 deletions

View file

@ -44,6 +44,12 @@ class RutubeIE(InfoExtractor):
'only_matching': True,
}]
@staticmethod
def _extract_urls(webpage):
return [mobj.group('url') for mobj in re.finditer(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//rutube\.ru/embed/[\da-z]{32}.*?)\1',
webpage)]
def _real_extract(self, url):
video_id = self._match_id(url)
video = self._download_json(