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')
38 cfg_xml = self._download_xml(
39 cfg_url, video_id, note='Downloading metadata')
43 'url': item.find('videoLink').text,
44 'format_id': item.find('res').text,
45 } for item in cfg_xml.findall('./quality/item')
51 'description': video_description,
53 'age_limit': age_limit,