4 from .common
import InfoExtractor
6 compat_urllib_parse_urlparse
,
14 class KeezMoviesIE(InfoExtractor
):
15 _VALID_URL
= r
'^(?:https?://)?(?:www\.)?(?P<url>keezmovies\.com/video/.+?(?P<videoid>[0-9]+))(?:[/?&]|$)'
17 u
'url': u
'http://www.keezmovies.com/video/petite-asian-lady-mai-playing-in-bathtub-1214711',
18 u
'file': u
'1214711.mp4',
19 u
'md5': u
'6e297b7e789329923fcf83abb67c9289',
21 u
"title": u
"Petite Asian Lady Mai Playing In Bathtub",
26 def _real_extract(self
, url
):
27 mobj
= re
.match(self
._VALID
_URL
, url
)
28 video_id
= mobj
.group('videoid')
29 url
= 'http://www.' + mobj
.group('url')
31 req
= compat_urllib_request
.Request(url
)
32 req
.add_header('Cookie', 'age_verified=1')
33 webpage
= self
._download
_webpage
(req
, video_id
)
36 mobj
= re
.search(r
'href="([^"]+)"></iframe>', webpage
)
38 embedded_url
= mobj
.group(1)
39 return self
.url_result(embedded_url
)
41 video_title
= self
._html
_search
_regex
(r
'<h1 [^>]*>([^<]+)', webpage
, u
'title')
42 video_url
= compat_urllib_parse
.unquote(self
._html
_search
_regex
(r
'video_url=(.+?)&', webpage
, u
'video_url'))
43 if webpage
.find('encrypted=true')!=-1:
44 password
= self
._html
_search
_regex
(r
'video_title=(.+?)&', webpage
, u
'password')
45 video_url
= aes_decrypt_text(video_url
, password
, 32).decode('utf-8')
46 path
= compat_urllib_parse_urlparse(video_url
).path
47 extension
= os
.path
.splitext(path
)[1][1:]
48 format
= path
.split('/')[4].split('_')[:2]
49 format
= "-".join(format
)
51 age_limit
= self
._rta
_search
(webpage
)
60 'age_limit': age_limit
,