4 from .common import InfoExtractor
7 compat_urllib_parse_urlparse,
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'[^A-Za-z0-9]?(?:file|url):\s*["\'](http[^\'"&]*)', webpage)
29 links = [compat_urllib_parse.unquote(l) for l in links]
31 root, pathext = os.path.splitext(compat_urllib_parse_urlparse(link).path)
34 elif pathext == '.mp4':
37 if ext == title[-len(ext):]:
38 title = title[:-len(ext)]
45 'thumbnail': thumbnail,