]>
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 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
,