1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class EmpflixIE(InfoExtractor):
9 _VALID_URL = r'^https?://www\.empflix\.com/videos/.*?-(?P<id>[0-9]+)\.html'
11 'url': 'http://www.empflix.com/videos/Amateur-Finger-Fuck-33051.html',
12 'md5': 'b1bc15b6412d33902d6e5952035fcabc',
16 'title': 'Amateur Finger Fuck',
17 'description': 'Amateur solo finger fucking.',
22 def _real_extract(self, url):
23 mobj = re.match(self._VALID_URL, url)
24 video_id = mobj.group('id')
26 webpage = self._download_webpage(url, video_id)
27 age_limit = self._rta_search(webpage)
29 video_title = self._html_search_regex(
30 r'name="title" value="(?P<title>[^"]*)"', webpage, 'title')
31 video_description = self._html_search_regex(
32 r'name="description" value="([^"]*)"', webpage, 'description', fatal=False)
34 cfg_url = self._html_search_regex(
35 r'flashvars\.config = escape\("([^"]+)"',
36 webpage, 'flashvars.config')
39 cfg_xml = self._download_webpage(
40 cfg_url, video_id, note='Downloading metadata')
46 } for item in re.findall(
47 r'<item>\s*<res>([^>]+)</res>\s*<videoLink>([^<]+)</videoLink>\s*</item>', cfg_xml)
50 thumbnail = self._html_search_regex(
51 r'<startThumb>([^<]+)</startThumb>', cfg_xml, 'thumbnail', fatal=False)
56 'description': video_description,
57 'thumbnail': thumbnail,
59 'age_limit': age_limit,