Fix title extraction for the new bilibili web page

This commit is contained in:
Star Brilliant 2013-11-17 11:00:48 +08:00
parent 3e0e9b8cc5
commit 3e68331e96

View File

@ -79,7 +79,7 @@ def bilibili_download(url, output_dir = '.', merge = True, info_only = False):
assert re.match(r'http://(www.bilibili.tv|bilibili.kankanews.com|bilibili.smgbb.cn)/video/av(\d+)', url)
html = get_html(url)
title = r1(r'<h2>([^<>]+)</h2>', html)
title = r1(r'<h2[^>]*>([^<>]+)</h2>', html)
title = unescape_html(title)
title = escape_file_path(title)