diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-05 18:18:15 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-05 18:18:15 +0100 |
commit | 18c3c15391de27d4dd6e550087ca244d294a9bf2 (patch) | |
tree | b01e0e5cb9bcab0d019daf4a4f51656098c9a7ca /youtube_dl/extractor | |
parent | dda620e88c68e995afcc3cd35b9d360cb42527a0 (diff) | |
parent | 03ff2cc1c49c82daf2218b76e169c2d679447f03 (diff) |
Merge remote-tracking branch 'Oteng/master'
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/auengine.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/youtube_dl/extractor/auengine.py b/youtube_dl/extractor/auengine.py index 014a21952..17c3ad2ef 100644 --- a/youtube_dl/extractor/auengine.py +++ b/youtube_dl/extractor/auengine.py @@ -29,17 +29,12 @@ class AUEngineIE(InfoExtractor): webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'<title>(?P<title>.+?)</title>', webpage, 'title') title = title.strip() - links = re.findall(r'\s(?:file|url):\s*["\']([^\'"]+)["\']', webpage) - links = map(compat_urllib_parse.unquote, links) - - thumbnail = None - video_url = None - for link in links: - if link.endswith('.png'): - thumbnail = link - elif '/videos/' in link: - video_url = link - if not video_url: + video_url = re.findall(r'http://\w+.auengine.com/vod/.*[^\W]', webpage) + video_url = map(compat_urllib_parse.unquote, video_url)[0] + thumbnail = re.findall(r'http://\w+.auengine.com/thumb/.*[^\W]', webpage) + thumbnail = map(compat_urllib_parse.unquote, thumbnail)[0] + + if video_url == "" and thumbnail =="": raise ExtractorError('Could not find video URL') ext = '.' + determine_ext(video_url) if ext == title[-len(ext):]: @@ -52,3 +47,4 @@ class AUEngineIE(InfoExtractor): 'thumbnail': thumbnail, 'http_referer': 'http://www.auengine.com/flowplayer/flowplayer.commercial-3.2.14.swf', } + |