1 from .common
import InfoExtractor
10 class AlphaPornoIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?alphaporno\.com/videos/(?P<id>[^/]+)'
13 'url': 'http://www.alphaporno.com/videos/sensual-striptease-porn-with-samantha-alexandra/',
14 'md5': 'feb6d3bba8848cd54467a87ad34bd38e',
17 'display_id': 'sensual-striptease-porn-with-samantha-alexandra',
19 'title': 'Sensual striptease porn with Samantha Alexandra',
20 'thumbnail': r
're:https?://.*\.jpg$',
21 'timestamp': 1418694611,
22 'upload_date': '20141216',
24 'filesize_approx': 54120000,
31 def _real_extract(self
, url
):
32 display_id
= self
._match
_id
(url
)
34 webpage
= self
._download
_webpage
(url
, display_id
)
36 video_id
= self
._search
_regex
(
37 r
"video_id\s*:\s*'([^']+)'", webpage
, 'video id', default
=None)
39 video_url
= self
._search
_regex
(
40 r
"video_url\s*:\s*'([^']+)'", webpage
, 'video url')
41 ext
= self
._html
_search
_meta
(
42 'encodingFormat', webpage
, 'ext', default
='.mp4')[1:]
44 title
= self
._search
_regex
(
45 [r
'<meta content="([^"]+)" itemprop="description">',
46 r
'class="title" itemprop="name">([^<]+)<'],
48 thumbnail
= self
._html
_search
_meta
('thumbnail', webpage
, 'thumbnail')
49 timestamp
= parse_iso8601(self
._html
_search
_meta
(
50 'uploadDate', webpage
, 'upload date'))
51 duration
= parse_duration(self
._html
_search
_meta
(
52 'duration', webpage
, 'duration'))
53 filesize_approx
= parse_filesize(self
._html
_search
_meta
(
54 'contentSize', webpage
, 'file size'))
55 bitrate
= int_or_none(self
._html
_search
_meta
(
56 'bitrate', webpage
, 'bitrate'))
57 categories
= self
._html
_search
_meta
(
58 'keywords', webpage
, 'categories', default
='').split(',')
60 age_limit
= self
._rta
_search
(webpage
)
64 'display_id': display_id
,
68 'thumbnail': thumbnail
,
69 'timestamp': timestamp
,
71 'filesize_approx': filesize_approx
,
73 'categories': categories
,
74 'age_limit': age_limit
,