]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/redtube.py
3 from .common
import InfoExtractor
6 class RedTubeIE(InfoExtractor
):
7 _VALID_URL
= r
'(?:http://)?(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
9 u
'url': u
'http://www.redtube.com/66418',
10 u
'file': u
'66418.mp4',
11 # md5 varies from time to time, as in
12 # https://travis-ci.org/rg3/youtube-dl/jobs/14052463#L295
13 #u'md5': u'7b8c22b5e7098a3e1c09709df1126d2d',
15 u
"title": u
"Sucked on a toilet",
20 def _real_extract(self
, url
):
21 mobj
= re
.match(self
._VALID
_URL
, url
)
23 video_id
= mobj
.group('id')
24 video_extension
= 'mp4'
25 webpage
= self
._download
_webpage
(url
, video_id
)
27 self
.report_extraction(video_id
)
29 video_url
= self
._html
_search
_regex
(
30 r
'<source src="(.+?)" type="video/mp4">', webpage
, u
'video URL')
32 video_title
= self
._html
_search
_regex
(
33 r
'<h1 class="videoTitle[^"]*">(.+?)</h1>',
36 # No self-labeling, but they describe themselves as
37 # "Home of Videos Porno"
43 'ext': video_extension
,
45 'age_limit': age_limit
,