projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[generic] Add support for rutube embeds
[youtube-dl]
/
youtube_dl
/
extractor
/
rutube.py
diff --git
a/youtube_dl/extractor/rutube.py
b/youtube_dl/extractor/rutube.py
index 663b75583514c8805c1cdc06678f064bff5010f5..889fa76289dc75aa7e868ee2b7496ee69e2f0e72 100644
(file)
--- a/
youtube_dl/extractor/rutube.py
+++ b/
youtube_dl/extractor/rutube.py
@@
-44,6
+44,12
@@
class RutubeIE(InfoExtractor):
'only_matching': True,
}]
'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(
def _real_extract(self, url):
video_id = self._match_id(url)
video = self._download_json(