]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/redtube.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class RedTubeIE(InfoExtractor
):
7 _VALID_URL
= r
'http://(?:www\.)?redtube\.com/(?P<id>[0-9]+)'
9 'url': 'http://www.redtube.com/66418',
13 "title": "Sucked on a toilet",
18 def _real_extract(self
, url
):
19 video_id
= self
._match
_id
(url
)
20 webpage
= self
._download
_webpage
(url
, video_id
)
22 video_url
= self
._html
_search
_regex
(
23 r
'<source src="(.+?)" type="video/mp4">', webpage
, 'video URL')
24 video_title
= self
._html
_search
_regex
(
25 r
'<h1 class="videoTitle[^"]*">(.+?)</h1>',
27 video_thumbnail
= self
._og
_search
_thumbnail
(webpage
)
29 # No self-labeling, but they describe themselves as
30 # "Home of Videos Porno"
38 'thumbnail': video_thumbnail
,
39 'age_limit': age_limit
,