Browse Source

Merge remote-tracking branch 'Oteng/master'

totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
18c3c15391
2 changed files with 9 additions and 11 deletions
  1. +2
    -0
      .gitignore
  2. +7
    -11
      youtube_dl/extractor/auengine.py

+ 2
- 0
.gitignore View File

@ -31,3 +31,5 @@ updates_key.pem
test/testdata
.tox
youtube-dl.zsh
.idea
.idea/*

+ 7
- 11
youtube_dl/extractor/auengine.py View File

@ -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',
}

Loading…
Cancel
Save