mirror of
https://github.com/soimort/you-get.git
synced 2025-01-24 05:55:02 +03:00
[bilibili] do not use description as title
This commit is contained in:
parent
8980d105df
commit
95eef15455
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user