3 from .common import InfoExtractor
10 class AUEngineIE(InfoExtractor):
12 u'url': u'http://auengine.com/embed.php?file=lfvlytY6&w=650&h=370',
13 u'file': u'lfvlytY6.mp4',
14 u'md5': u'48972bdbcf1a3a2f5533e62425b41d4f',
16 u"title": u"[Commie]The Legend of the Legendary Heroes - 03 - Replication Eye (Alpha Stigma)[F9410F5A]"
19 _VALID_URL = r'(?:http://)?(?:www\.)?auengine\.com/embed\.php\?.*?file=([^&]+).*?'
21 def _real_extract(self, url):
22 mobj = re.match(self._VALID_URL, url)
23 video_id = mobj.group(1)
24 webpage = self._download_webpage(url, video_id)
25 title = self._html_search_regex(r'<title>(?P<title>.+?)</title>',
28 links = re.findall(r'\s(?:file|url):\s*["\']([^\'"]+)["\']', webpage)
29 links = map(compat_urllib_parse.unquote, links)
34 if link.endswith('.png'):
36 elif '/videos/' in link:
39 raise ExtractorError(u'Could not find video URL')
40 ext = u'.' + determine_ext(video_url)
41 if ext == title[-len(ext):]:
42 title = title[:-len(ext)]
48 'thumbnail': thumbnail,