diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-03-04 00:46:33 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-03-04 00:46:33 +0700 |
commit | eb3079b6ce54b63b4cc609198382b6db2cbb6f5f (patch) | |
tree | 8c94e830d2b39a7f04ff8c908077a12878d6ec86 /youtube_dl/extractor/rutube.py | |
parent | bc82f22879e222a1ade35fd8ebd7bb535f9166dd (diff) |
[generic] Add support for rutube embeds
Diffstat (limited to 'youtube_dl/extractor/rutube.py')
-rw-r--r-- | youtube_dl/extractor/rutube.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/rutube.py b/youtube_dl/extractor/rutube.py index 663b75583..889fa7628 100644 --- a/youtube_dl/extractor/rutube.py +++ b/youtube_dl/extractor/rutube.py @@ -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( |