]>
Commit | Line | Data |
---|---|---|
56a94d8c PH |
1 | from __future__ import unicode_literals |
2 | ||
33c7ff86 | 3 | from .common import InfoExtractor |
4 | ||
56a94d8c | 5 | |
33c7ff86 | 6 | class HentaiStigmaIE(InfoExtractor): |
56a94d8c | 7 | _VALID_URL = r'^https?://hentai\.animestigma\.com/(?P<id>[^/]+)' |
33c7ff86 | 8 | _TEST = { |
56a94d8c PH |
9 | 'url': 'http://hentai.animestigma.com/inyouchuu-etsu-bonus/', |
10 | 'md5': '4e3d07422a68a4cc363d8f57c8bf0d23', | |
11 | 'info_dict': { | |
12 | 'id': 'inyouchuu-etsu-bonus', | |
13 | 'ext': 'mp4', | |
611c1dd9 S |
14 | 'title': 'Inyouchuu Etsu Bonus', |
15 | 'age_limit': 18, | |
33c7ff86 | 16 | } |
17 | } | |
18 | ||
19 | def _real_extract(self, url): | |
cf386750 | 20 | video_id = self._match_id(url) |
33c7ff86 | 21 | |
33c7ff86 | 22 | webpage = self._download_webpage(url, video_id) |
23 | ||
56a94d8c | 24 | title = self._html_search_regex( |
cf386750 | 25 | r'<h2[^>]+class="posttitle"[^>]*><a[^>]*>([^<]+)</a>', |
56a94d8c PH |
26 | webpage, 'title') |
27 | wrap_url = self._html_search_regex( | |
cf386750 | 28 | r'<iframe[^>]+src="([^"]+mp4)"', webpage, 'wrapper url') |
33c7ff86 | 29 | wrap_webpage = self._download_webpage(wrap_url, video_id) |
30 | ||
56a94d8c | 31 | video_url = self._html_search_regex( |
cf386750 | 32 | r'file\s*:\s*"([^"]+)"', wrap_webpage, 'video url') |
33c7ff86 | 33 | |
56a94d8c PH |
34 | return { |
35 | 'id': video_id, | |
36 | 'url': video_url, | |
37 | 'title': title, | |
38 | 'age_limit': 18, | |
39 | } |