2 from __future__ import unicode_literals
6 from .common import InfoExtractor
13 class EpornerIE(InfoExtractor):
14 _VALID_URL = r'https?://(?:www\.)?eporner\.com/hd-porn/(?P<id>\d+)/(?P<title_dash>[\w-]+)/?'
16 'url': 'http://www.eporner.com/hd-porn/95008/Infamous-Tiffany-Teen-Strip-Tease-Video/',
17 'md5': '3b427ae4b9d60619106de3185c2987cd',
21 'title': 'Infamous Tiffany Teen Strip Tease Video',
28 def _real_extract(self, url):
29 mobj = re.match(self._VALID_URL, url)
30 video_id = mobj.group('id')
31 webpage = self._download_webpage(url, video_id)
32 title = self._html_search_regex(
33 r'<title>(.*?) - EPORNER', webpage, 'title')
35 redirect_code = self._html_search_regex(
36 r'<script type="text/javascript" src="/config5/%s/([a-f\d]+)/">' % video_id,
37 webpage, 'redirect_code')
38 redirect_url = 'http://www.eporner.com/config5/%s/%s' % (video_id, redirect_code)
39 player_code = self._download_webpage(
40 redirect_url, video_id, note='Downloading player config')
41 video_url = self._html_search_regex(
42 r'file: "(.*?)",', player_code, 'video_url')
44 duration = parse_duration(self._search_regex(
45 r'class="mbtim">([0-9:]+)</div>', webpage, 'duration',
47 view_count = str_to_int(self._search_regex(
48 r'id="cinemaviews">\s*([0-9,]+)\s*<small>views',
49 webpage, 'view count', fatal=False))
56 'view_count': view_count,
57 'age_limit': self._rta_search(webpage),