]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/xnxx.py
40d8489000bb7a25f277c84d6d407b72ce778c8d
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)"
25 def _real_extract(self
, url
):
26 mobj
= re
.match(self
._VALID
_URL
, url
)
28 raise ExtractorError(u
'Invalid URL: %s' % url
)
29 video_id
= mobj
.group(1)
32 webpage
= self
._download
_webpage
(url
, video_id
)
34 video_url
= self
._search
_regex
(self
.VIDEO_URL_RE
,
35 webpage
, u
'video URL')
36 video_url
= compat_urllib_parse
.unquote(video_url
)
38 video_title
= self
._html
_search
_regex
(self
.VIDEO_TITLE_RE
,
41 video_thumbnail
= self
._search
_regex
(self
.VIDEO_THUMB_RE
,
42 webpage
, u
'thumbnail', fatal
=False)
51 'thumbnail': video_thumbnail
,