1 from __future__ import unicode_literals
3 from .common import InfoExtractor
12 class HellPornoIE(InfoExtractor):
13 _VALID_URL = r'https?://(?:www\.)?hellporno\.(?:com/videos|net/v)/(?P<id>[^/]+)'
15 'url': 'http://hellporno.com/videos/dixie-is-posing-with-naked-ass-very-erotic/',
16 'md5': 'f0a46ebc0bed0c72ae8fe4629f7de5f3',
19 'display_id': 'dixie-is-posing-with-naked-ass-very-erotic',
21 'title': 'Dixie is posing with naked ass very erotic',
22 'description': 'md5:9a72922749354edb1c4b6e540ad3d215',
24 'thumbnail': r're:https?://.*\.jpg$',
26 'timestamp': 1398762720,
27 'upload_date': '20140429',
32 'url': 'http://hellporno.net/v/186271/',
33 'only_matching': True,
36 def _real_extract(self, url):
37 display_id = self._match_id(url)
39 webpage = self._download_webpage(url, display_id)
41 title = remove_end(self._html_search_regex(
42 r'<title>([^<]+)</title>', webpage, 'title'), ' - Hell Porno')
44 info = self._parse_html5_media_entries(url, webpage, display_id)[0]
45 self._sort_formats(info['formats'])
47 video_id = self._search_regex(
48 (r'chs_object\s*=\s*["\'](\d+)',
49 r'params\[["\']video_id["\']\]\s*=\s*(\d+)'), webpage, 'video id',
51 description = self._search_regex(
52 r'class=["\']desc_video_view_v2[^>]+>([^<]+)', webpage,
53 'description', fatal=False)
56 for c in self._html_search_meta(
57 'keywords', webpage, 'categories', default='').split(',')
59 duration = int_or_none(self._og_search_property(
60 'video:duration', webpage, fatal=False))
61 timestamp = unified_timestamp(self._og_search_property(
62 'video:release_date', webpage, fatal=False))
63 view_count = int_or_none(self._search_regex(
64 r'>Views\s+(\d+)', webpage, 'view count', fatal=False))
66 return merge_dicts(info, {
68 'display_id': display_id,
70 'description': description,
71 'categories': categories,
73 'timestamp': timestamp,
74 'view_count': view_count,