[bilibili] do not use description as title

This commit is contained in:
Mort Yao 2015-10-17 05:27:10 +02:00
parent 8980d105df
commit 95eef15455

View File

@ -110,10 +110,8 @@ def bilibili_download_by_cid(cid, title, output_dir='.', merge=True, info_only=F
def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs): def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
html = get_content(url) html = get_content(url)
title = r1_of([r'<meta name="description" content="(.+)"', title = r1_of([r'<meta name="title" content="([^<>]{1,999})" />',
r'<meta name="title" content="([^<>]{1,999})" />',
r'<h1[^>]*>([^<>]+)</h1>'], html) r'<h1[^>]*>([^<>]+)</h1>'], html)
title = title.split('\r')[0]
title = unescape_html(title) title = unescape_html(title)
title = escape_file_path(title) title = escape_file_path(title)