1 from __future__
import unicode_literals
6 from .common
import InfoExtractor
7 from ..compat
import compat_urllib_parse_urlparse
8 from ..utils
import sanitized_Request
11 class KeezMoviesIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?keezmovies\.com/video/.+?(?P<id>[0-9]+)(?:[/?&]|$)'
14 'url': 'http://www.keezmovies.com/video/petite-asian-lady-mai-playing-in-bathtub-1214711',
15 'md5': '6e297b7e789329923fcf83abb67c9289',
19 'title': 'Petite Asian Lady Mai Playing In Bathtub',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
27 req
= sanitized_Request(url
)
28 req
.add_header('Cookie', 'age_verified=1')
29 webpage
= self
._download
_webpage
(req
, video_id
)
32 mobj
= re
.search(r
'href="([^"]+)"></iframe>', webpage
)
34 embedded_url
= mobj
.group(1)
35 return self
.url_result(embedded_url
)
37 video_title
= self
._html
_search
_regex
(
38 r
'<h1 [^>]*>([^<]+)', webpage
, 'title')
39 video_url
= self
._html
_search
_regex
(
40 r
'(?s)html5VideoPlayer = .*?src="([^"]+)"', webpage
, 'video URL')
41 path
= compat_urllib_parse_urlparse(video_url
).path
42 extension
= os
.path
.splitext(path
)[1][1:]
43 format
= path
.split('/')[4].split('_')[:2]
44 format
= "-".join(format
)
46 age_limit
= self
._rta
_search
(webpage
)
55 'age_limit': age_limit
,