1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class RedTubeIE(InfoExtractor):
9 _VALID_URL = r'http://(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
11 'url': 'http://www.redtube.com/66418',
13 # md5 varies from time to time, as in
14 # https://travis-ci.org/rg3/youtube-dl/jobs/14052463#L295
15 #'md5': u'7b8c22b5e7098a3e1c09709df1126d2d',
17 "title": "Sucked on a toilet",
22 def _real_extract(self, url):
23 mobj = re.match(self._VALID_URL, url)
25 video_id = mobj.group('id')
26 video_extension = 'mp4'
27 webpage = self._download_webpage(url, video_id)
29 self.report_extraction(video_id)
31 video_url = self._html_search_regex(
32 r'<source src="(.+?)" type="video/mp4">', webpage, u'video URL')
34 video_title = self._html_search_regex(
35 r'<h1 class="videoTitle[^"]*">(.+?)</h1>',
38 video_thumbnail = self._og_search_thumbnail(webpage)
40 # No self-labeling, but they describe themselves as
41 # "Home of Videos Porno"
47 'ext': video_extension,
49 'thumbnail': video_thumbnail,
50 'age_limit': age_limit,