diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-04 03:15:27 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-04 03:15:27 +0100 |
commit | 7a1818c99b1729796f62c341b1b3f809cd47dbf8 (patch) | |
tree | e44bd29d7443bbe3139d91dfa6a88d5bde2aafff /youtube_dl/extractor/vk.py | |
parent | 2ccd1b10e58cc8e5173dc1aeedc2b3f0ef9b55bf (diff) |
[vk] Add support for rutube embeds (Fixes #4514)
Diffstat (limited to 'youtube_dl/extractor/vk.py')
-rw-r--r-- | youtube_dl/extractor/vk.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py index 542e9198a..129de6cf3 100644 --- a/youtube_dl/extractor/vk.py +++ b/youtube_dl/extractor/vk.py @@ -164,6 +164,15 @@ class VKIE(InfoExtractor): self.to_screen('Youtube video detected') return self.url_result(m_yt.group(1), 'Youtube') + m_rutube = re.search( + r'\ssrc="((?:https?:)?//rutube\.ru\\?/video\\?/embed(?:.*?))\\?"', info_page) + assert m_rutube + if m_rutube is not None: + self.to_screen('rutube video detected') + rutube_url = self._proto_relative_url( + m_rutube.group(1).replace('\\', '')) + return self.url_result(rutube_url) + m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.*?});', info_page) if m_opts: m_opts_url = re.search(r"url\s*:\s*'([^']+)", m_opts.group(1)) |