1 from __future__ import unicode_literals
6 from .common import InfoExtractor
8 compat_urllib_parse_urlparse,
17 class KeezMoviesIE(InfoExtractor):
18 _VALID_URL = r'https?://(?:www\.)?keezmovies\.com/video/.+?(?P<id>[0-9]+)(?:[/?&]|$)'
20 'url': 'http://www.keezmovies.com/video/petite-asian-lady-mai-playing-in-bathtub-1214711',
21 'file': '1214711.mp4',
22 'md5': '6e297b7e789329923fcf83abb67c9289',
24 'title': 'Petite Asian Lady Mai Playing In Bathtub',
29 def _real_extract(self, url):
30 video_id = self._match_id(url)
32 req = compat_urllib_request.Request(url)
33 req.add_header('Cookie', 'age_verified=1')
34 webpage = self._download_webpage(req, video_id)
37 mobj = re.search(r'href="([^"]+)"></iframe>', webpage)
39 embedded_url = mobj.group(1)
40 return self.url_result(embedded_url)
42 video_title = self._html_search_regex(r'<h1 [^>]*>([^<]+)', webpage, 'title')
43 video_url = compat_urllib_parse.unquote(self._html_search_regex(r'video_url=(.+?)&', webpage, 'video_url'))
44 if 'encrypted=true' in webpage:
45 password = self._html_search_regex(r'video_title=(.+?)&', webpage, 'password')
46 video_url = aes_decrypt_text(video_url, password, 32).decode('utf-8')
47 path = compat_urllib_parse_urlparse(video_url).path
48 extension = os.path.splitext(path)[1][1:]
49 format = path.split('/')[4].split('_')[:2]
50 format = "-".join(format)
52 age_limit = self._rta_search(webpage)
61 'age_limit': age_limit,