2 from __future__ import unicode_literals
4 from .common import InfoExtractor
15 class PornFlipIE(InfoExtractor):
16 _VALID_URL = r'https?://(?:www\.)?pornflip\.com/v/(?P<id>[0-9A-Za-z]{11})'
18 'url': 'https://www.pornflip.com/v/wz7DfNhMmep',
19 'md5': '98c46639849145ae1fd77af532a9278c',
23 'title': '2 Amateurs swallow make his dream cumshots true',
24 'uploader': 'figifoto',
25 'thumbnail': r're:^https?://.*\.jpg$',
30 def _real_extract(self, url):
31 video_id = self._match_id(url)
32 webpage = self._download_webpage(url, video_id)
33 uploader = self._html_search_regex(
34 r'<span class="name">\s+<a class="ajax" href=".+>\s+<strong>([^<]+)<', webpage, 'uploader', fatal=False)
35 flashvars = compat_parse_qs(self._html_search_regex(
36 r'<embed.+?flashvars="([^"]+)"',
37 webpage, 'flashvars'))
38 title = flashvars['video_vars[title]'][0]
39 thumbnail = try_get(flashvars, lambda x: x['video_vars[big_thumb]'][0])
41 for k, v in flashvars.items():
42 height = self._search_regex(r'video_vars\[video_urls\]\[(\d+).+?\]', k, 'height', default=None)
46 'height': int_or_none(height),
50 self._sort_formats(formats)
57 'thumbnail': thumbnail,