1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from ..compat import compat_str
11 class YourPornIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?sxyprn\.com/post/(?P<id>[^/?#&.]+)'
14 'url': 'https://sxyprn.com/post/57ffcb2e1179b.html',
15 'md5': '6f8682b6464033d87acaa7a8ff0c092e',
17 'id': '57ffcb2e1179b',
19 'title': 'md5:c9f43630bd968267672651ba905a7d35',
20 'thumbnail': r're:^https?://.*\.jpg$',
25 'skip_download': True,
28 'url': 'https://sxyprn.com/post/57ffcb2e1179b.html',
29 'only_matching': True,
32 def _real_extract(self, url):
33 video_id = self._match_id(url)
35 webpage = self._download_webpage(url, video_id)
37 parts = self._parse_json(
39 r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info',
41 video_id)[video_id].split('/')
44 for c in parts[6] + parts[7]:
47 parts[5] = compat_str(int(parts[5]) - num)
49 video_url = urljoin(url, '/'.join(parts))
51 title = (self._search_regex(
52 r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
53 default=None) or self._og_search_description(webpage)).strip()
54 thumbnail = self._og_search_thumbnail(webpage)
55 duration = parse_duration(self._search_regex(
56 r'duration\s*:\s*<[^>]+>([\d:]+)', webpage, 'duration',
63 'thumbnail': thumbnail,