1 from __future__ import unicode_literals
5 from .common import InfoExtractor
6 from ..compat import compat_urllib_parse
13 class AUEngineIE(InfoExtractor):
14 _VALID_URL = r'http://(?:www\.)?auengine\.com/embed\.php\?.*?file=(?P<id>[^&]+).*?'
17 'url': 'http://auengine.com/embed.php?file=lfvlytY6&w=650&h=370',
18 'md5': '48972bdbcf1a3a2f5533e62425b41d4f',
22 'title': '[Commie]The Legend of the Legendary Heroes - 03 - Replication Eye (Alpha Stigma)[F9410F5A]'
26 def _real_extract(self, url):
27 video_id = self._match_id(url)
29 webpage = self._download_webpage(url, video_id)
30 title = self._html_search_regex(r'<title>(?P<title>.+?)</title>', webpage, 'title')
32 video_url = re.findall(r'http://\w+.auengine.com/vod/.*[^\W]', webpage)
33 video_url = map(compat_urllib_parse.unquote, video_url)[0]
34 thumbnail = re.findall(r'http://\w+.auengine.com/thumb/.*[^\W]', webpage)
35 thumbnail = map(compat_urllib_parse.unquote, thumbnail)[0]
37 if video_url == "" and thumbnail =="":
38 raise ExtractorError('Could not find video URL')
39 ext = '.' + determine_ext(video_url)
40 if ext == title[-len(ext):]:
41 title = title[:-len(ext)]
47 'thumbnail': thumbnail,
48 'http_referer': 'http://www.auengine.com/flowplayer/flowplayer.commercial-3.2.14.swf',