3 from .common import InfoExtractor
6 class RedTubeIE(InfoExtractor):
7 _VALID_URL = r'(?:http://)?(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
9 def _real_extract(self,url):
10 mobj = re.match(self._VALID_URL, url)
12 video_id = mobj.group('id')
13 video_extension = 'mp4'
14 webpage = self._download_webpage(url, video_id)
16 self.report_extraction(video_id)
18 video_url = self._html_search_regex(r'<source src="(.+?)" type="video/mp4">',
19 webpage, u'video URL')
21 video_title = self._html_search_regex('<h1 class="videoTitle slidePanelMovable">(.+?)</h1>',
27 'ext': video_extension,