1 from __future__ import unicode_literals
5 from .common import InfoExtractor
7 class AlphaPornoIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?alphaporno\.com/videos/(?P<display_id>[^/]+)'
10 'url': 'http://www.alphaporno.com/videos/sensual-striptease-porn-with-samantha-alexandra/',
11 'md5': 'feb6d3bba8848cd54467a87ad34bd38e',
15 'title': 'Sensual striptease porn with Samantha Alexandra - Striptease Porn',
16 'description': 'md5:c4447dc80e5be4c5f2711f7806e45424',
17 'categories': list, # NSFW
18 'thumbnail': 're:https?://.*\.jpg$',
23 def _real_extract(self, url):
24 webpage = self._download_webpage(url, 'main')
26 video_id = self._html_search_regex(r'video_id:\s*\'([^\']+)\'', webpage, 'id')
28 video_url = self._html_search_regex(r'video_url:\s*\'([^\']+)\'', webpage, 'video_url')
30 ext = self._html_search_meta('encodingFormat', webpage, 'ext')[1:]
32 title = self._html_search_regex(
33 r'<title>([^<]+)</title>', webpage, 'title')
35 description = self._html_search_meta('description', webpage, 'description', fatal=False)
37 thumbnail = self._html_search_meta('thumbnail', webpage, 'thumbnail', fatal=False)
39 categories_str = self._html_search_meta(
40 'keywords', webpage, 'categories', fatal=False)
42 None if categories_str is None
43 else categories_str.split(','))
50 'description': description,
51 'thumbnail': thumbnail,
52 'categories': categories,