[acfun] improve regex for getting video part title

This commit is contained in:
Mort Yao 2016-09-14 19:59:55 +02:00
parent e1d5581e65
commit 0984190f93
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -78,7 +78,7 @@ def acfun_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
title = escape_file_path(title)
assert title
video = re.search('data-vid="(\d+)"\s*data-scode="".*>([^<]+)</a>', html)
video = re.search('data-vid="(\d+)"\s*data-scode=""[^<]*title="([^"]+)"', html)
vid = video.group(1)
title = title + ' - ' + video.group(2)
acfun_download_by_vid(vid, title,