mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-08-17 20:00:29 +02:00
Merge remote-tracking branch 'Oteng/master'
This commit is contained in:
commit
18c3c15391
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,3 +31,5 @@ updates_key.pem
|
|||||||
test/testdata
|
test/testdata
|
||||||
.tox
|
.tox
|
||||||
youtube-dl.zsh
|
youtube-dl.zsh
|
||||||
|
.idea
|
||||||
|
.idea/*
|
@ -29,17 +29,12 @@ class AUEngineIE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
title = self._html_search_regex(r'<title>(?P<title>.+?)</title>', webpage, 'title')
|
title = self._html_search_regex(r'<title>(?P<title>.+?)</title>', webpage, 'title')
|
||||||
title = title.strip()
|
title = title.strip()
|
||||||
links = re.findall(r'\s(?:file|url):\s*["\']([^\'"]+)["\']', webpage)
|
video_url = re.findall(r'http://\w+.auengine.com/vod/.*[^\W]', webpage)
|
||||||
links = map(compat_urllib_parse.unquote, links)
|
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]
|
||||||
|
|
||||||
thumbnail = None
|
if video_url == "" and thumbnail =="":
|
||||||
video_url = None
|
|
||||||
for link in links:
|
|
||||||
if link.endswith('.png'):
|
|
||||||
thumbnail = link
|
|
||||||
elif '/videos/' in link:
|
|
||||||
video_url = link
|
|
||||||
if not video_url:
|
|
||||||
raise ExtractorError('Could not find video URL')
|
raise ExtractorError('Could not find video URL')
|
||||||
ext = '.' + determine_ext(video_url)
|
ext = '.' + determine_ext(video_url)
|
||||||
if ext == title[-len(ext):]:
|
if ext == title[-len(ext):]:
|
||||||
@ -52,3 +47,4 @@ class AUEngineIE(InfoExtractor):
|
|||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'http_referer': 'http://www.auengine.com/flowplayer/flowplayer.commercial-3.2.14.swf',
|
'http_referer': 'http://www.auengine.com/flowplayer/flowplayer.commercial-3.2.14.swf',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user