[bilibili] do not hide any URLError (better for debugging)

This commit is contained in:
Mort Yao 2016-09-07 10:44:05 +02:00
parent 2baeed762a
commit 24b2b4cb55
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -95,12 +95,9 @@ def bilibili_download_by_cid(cid, title, output_dir='.', merge=True, info_only=F
type_ = ''
size = 0
try:
for url in urls:
_, type_, temp = url_info(url)
size += temp or 0
except error.URLError:
log.wtf('[Failed] DNS not resolved. Please change your DNS server settings.')
for url in urls:
_, type_, temp = url_info(url)
size += temp or 0
print_info(site_info, title, type_, size)
if not info_only:
@ -196,4 +193,4 @@ def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs
site_info = "bilibili.com"
download = bilibili_download
download_playlist = bilibili_download
download_playlist = bilibili_download