提交 c47bffbb 编写于 作者: W wizardforcel

解决错误信息过长的问题

上级 405543e1
......@@ -7,4 +7,4 @@ https://github.com/apachecn/BiliDriveEx"""
__author__ = "ApacheCN"
__email__ = "apachecn@163.com"
__license__ = "SATA"
__version__ = "2020.03.09.1"
__version__ = "2020.03.09.2"
......@@ -251,5 +251,8 @@ class Bilibili:
return {'code': 114514, 'message': str(ex)}
if r.status_code != 200:
return {'code': r.status_code, 'message': r.text}
return {
'code': r.status_code,
'message': f'HTTP {r.status_code}'
}
return r.json()
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册