mirror of
https://github.com/soimort/you-get.git
synced 2025-02-10 12:12:26 +03:00
check title before extract other infos
This commit is contained in:
parent
86b55099f7
commit
7e599d5d38
@ -111,6 +111,10 @@ def bilibili_download(url, output_dir='.', merge=True, info_only=False):
|
||||
html = get_html(url)
|
||||
|
||||
title = r1_of([r'<meta name="title" content="([^<>]{1,999})" />',r'<h1[^>]*>([^<>]+)</h1>'], html)
|
||||
if title is None:
|
||||
log.e('[Failed] Maybe the url was wrong, or it could not access by guest')
|
||||
return
|
||||
|
||||
title = unescape_html(title)
|
||||
title = escape_file_path(title)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user