]>
Commit | Line | Data |
---|---|---|
1257b049 D |
1 | from __future__ import unicode_literals |
2 | ||
b2c6528b | 3 | from .nuevo import NuevoBaseIE |
1257b049 D |
4 | |
5 | ||
b2c6528b S |
6 | class RulePornIE(NuevoBaseIE): |
7 | _VALID_URL = r'https?://(?:www\.)?ruleporn\.com/(?:[^/?#&]+/)*(?P<id>[^/?#&]+)' | |
1257b049 D |
8 | _TEST = { |
9 | 'url': 'http://ruleporn.com/brunette-nympho-chick-takes-her-boyfriend-in-every-angle/', | |
10 | 'md5': '86861ebc624a1097c7c10eaf06d7d505', | |
11 | 'info_dict': { | |
12 | 'id': '48212', | |
b2c6528b | 13 | 'display_id': 'brunette-nympho-chick-takes-her-boyfriend-in-every-angle', |
1257b049 D |
14 | 'ext': 'mp4', |
15 | 'title': 'Brunette Nympho Chick Takes Her Boyfriend In Every Angle', | |
b2c6528b S |
16 | 'description': 'md5:6d28be231b981fff1981deaaa03a04d5', |
17 | 'age_limit': 18, | |
18 | 'duration': 635.1, | |
1257b049 D |
19 | } |
20 | } | |
21 | ||
22 | def _real_extract(self, url): | |
b2c6528b | 23 | display_id = self._match_id(url) |
1257b049 | 24 | |
b2c6528b | 25 | webpage = self._download_webpage(url, display_id) |
1257b049 | 26 | |
b2c6528b S |
27 | video_id = self._search_regex( |
28 | r'lovehomeporn\.com/embed/(\d+)', webpage, 'video id') | |
29 | ||
30 | title = self._search_regex( | |
31 | r'<h2[^>]+title=(["\'])(?P<url>.+?)\1', | |
32 | webpage, 'title', group='url') | |
33 | description = self._html_search_meta('description', webpage) | |
34 | ||
35 | info = self._extract_nuevo( | |
36 | 'http://lovehomeporn.com/media/nuevo/econfig.php?key=%s&rp=true' % video_id, | |
37 | video_id) | |
38 | info.update({ | |
39 | 'display_id': display_id, | |
1257b049 | 40 | 'title': title, |
b2c6528b S |
41 | 'description': description, |
42 | 'age_limit': 18 | |
43 | }) | |
44 | return info |