diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-11-06 21:42:41 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-11-06 21:42:41 +0700 |
commit | e28ed498e64545f02f2d3dbccf97ecf0e47aa82a (patch) | |
tree | fdafc819c2408015e5bd19042feae8469196df05 /youtube_dl/extractor/redtube.py | |
parent | 5021ca6c13e3d011dc24ecf38d326e3a59e726a1 (diff) |
[extractor/generic] Add support for redtube embds (closes #11099)
Diffstat (limited to 'youtube_dl/extractor/redtube.py')
-rw-r--r-- | youtube_dl/extractor/redtube.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/extractor/redtube.py b/youtube_dl/extractor/redtube.py index 7d9285ffb..c367a6ae7 100644 --- a/youtube_dl/extractor/redtube.py +++ b/youtube_dl/extractor/redtube.py @@ -1,5 +1,7 @@ from __future__ import unicode_literals +import re + from .common import InfoExtractor from ..utils import ( ExtractorError, @@ -28,6 +30,12 @@ class RedTubeIE(InfoExtractor): 'only_matching': True, }] + @staticmethod + def _extract_urls(webpage): + return re.findall( + r'<iframe[^>]+?src=["\'](?P<url>(?:https?:)?//embed\.redtube\.com/\?.*?\bid=\d+)', + webpage) + def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage( |