1 from .common
import InfoExtractor
8 class XXXYMoviesIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?xxxymovies\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)'
11 'url': 'http://xxxymovies.com/videos/138669/ecstatic-orgasm-sofcore/',
12 'md5': '810b1bdbbffff89dd13bdb369fe7be4b',
15 'display_id': 'ecstatic-orgasm-sofcore',
17 'title': 'Ecstatic Orgasm Sofcore',
27 def _real_extract(self
, url
):
28 mobj
= self
._match
_valid
_url
(url
)
29 video_id
= mobj
.group('id')
30 display_id
= mobj
.group('display_id')
32 webpage
= self
._download
_webpage
(url
, display_id
)
34 video_url
= self
._search
_regex
(
35 r
"video_url\s*:\s*'([^']+)'", webpage
, 'video URL')
37 title
= self
._html
_search
_regex
(
38 [r
'<div[^>]+\bclass="block_header"[^>]*>\s*<h1>([^<]+)<',
39 r
'<title>(.*?)\s*-\s*(?:XXXYMovies\.com|XXX\s+Movies)</title>'],
42 thumbnail
= self
._search
_regex
(
43 r
"preview_url\s*:\s*'([^']+)'",
44 webpage
, 'thumbnail', fatal
=False)
46 categories
= self
._html
_search
_meta
(
47 'keywords', webpage
, 'categories', default
='').split(',')
49 duration
= parse_duration(self
._search
_regex
(
50 r
'<span>Duration:</span>\s*(\d+:\d+)',
51 webpage
, 'duration', fatal
=False))
53 view_count
= int_or_none(self
._html
_search
_regex
(
54 r
'<div class="video_views">\s*(\d+)',
55 webpage
, 'view count', fatal
=False))
56 like_count
= int_or_none(self
._search
_regex
(
57 r
'>\s*Likes? <b>\((\d+)\)',
58 webpage
, 'like count', fatal
=False))
59 dislike_count
= int_or_none(self
._search
_regex
(
60 r
'>\s*Dislike <b>\((\d+)\)</b>',
61 webpage
, 'dislike count', fatal
=False))
63 age_limit
= self
._rta
_search
(webpage
)
67 'display_id': display_id
,
70 'thumbnail': thumbnail
,
71 'categories': categories
,
73 'view_count': view_count
,
74 'like_count': like_count
,
75 'dislike_count': dislike_count
,
76 'age_limit': age_limit
,