]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/xnxx.py
3 from .common
import InfoExtractor
11 class XNXXIE(InfoExtractor
):
12 _VALID_URL
= r
'^(?:https?://)?video\.xnxx\.com/video([0-9]+)/(.*)'
13 VIDEO_URL_RE
= r
'flv_url=(.*?)&'
14 VIDEO_TITLE_RE
= r
'<title>(.*?)\s+-\s+XNXX.COM'
15 VIDEO_THUMB_RE
= r
'url_bigthumb=(.*?)&'
17 u
'url': u
'http://video.xnxx.com/video1135332/lida_naked_funny_actress_5_',
18 u
'file': u
'1135332.flv',
19 u
'md5': u
'0831677e2b4761795f68d417e0b7b445',
21 u
"title": u
"lida \u00bb Naked Funny Actress (5)",
26 def _real_extract(self
, url
):
27 mobj
= re
.match(self
._VALID
_URL
, url
)
29 raise ExtractorError(u
'Invalid URL: %s' % url
)
30 video_id
= mobj
.group(1)
33 webpage
= self
._download
_webpage
(url
, video_id
)
35 video_url
= self
._search
_regex
(self
.VIDEO_URL_RE
,
36 webpage
, u
'video URL')
37 video_url
= compat_urllib_parse
.unquote(video_url
)
39 video_title
= self
._html
_search
_regex
(self
.VIDEO_TITLE_RE
,
42 video_thumbnail
= self
._search
_regex
(self
.VIDEO_THUMB_RE
,
43 webpage
, u
'thumbnail', fatal
=False)
52 'thumbnail': video_thumbnail
,