1 from .common
import InfoExtractor
7 class PornoXOIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html'
11 'url': 'http://www.pornoxo.com/videos/7564/striptease-from-sexy-secretary.html',
12 'md5': '582f28ecbaa9e6e24cb90f50f524ce87',
16 'title': 'Striptease From Sexy Secretary!',
17 'display_id': 'striptease-from-sexy-secretary',
18 'description': 'md5:0ee35252b685b3883f4a1d38332f9980',
19 'categories': list, # NSFW
20 'thumbnail': r
're:https?://.*\.jpg$',
25 def _real_extract(self
, url
):
26 mobj
= self
._match
_valid
_url
(url
)
27 video_id
, display_id
= mobj
.groups()
29 webpage
= self
._download
_webpage
(url
, video_id
)
30 video_data
= self
._extract
_jwplayer
_data
(webpage
, video_id
, require_title
=False)
32 title
= self
._html
_search
_regex
(
33 r
'<title>([^<]+)\s*-\s*PornoXO', webpage
, 'title')
35 view_count
= str_to_int(self
._html
_search
_regex
(
36 r
'[vV]iews:\s*([0-9,]+)', webpage
, 'view count', fatal
=False))
38 categories_str
= self
._html
_search
_regex
(
39 r
'<meta name="description" content=".*featuring\s*([^"]+)"',
40 webpage
, 'categories', fatal
=False)
42 None if categories_str
is None
43 else categories_str
.split(','))
48 'display_id': display_id
,
49 'description': self
._html
_search
_meta
('description', webpage
),
50 'categories': categories
,
51 'view_count': view_count
,