mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2025-12-26 04:48:05 +08:00
perf: 优化异常信息提示
This commit is contained in:
parent
76e40b6ddf
commit
06161391f1
Binary file not shown.
@ -181,8 +181,8 @@ msgstr "Do you need to update the configuration file"
|
||||
msgid "查看详细参数说明"
|
||||
msgstr "View detailed parameter descriptions"
|
||||
|
||||
msgid "网络异常,请求 {0} 失败"
|
||||
msgstr "Network error, failed to access {0}"
|
||||
msgid "网络异常,{0} 请求失败: {1}"
|
||||
msgstr "Network error, {0} request failed: {1}"
|
||||
|
||||
msgid "{0} 文件已存在,跳过下载"
|
||||
msgstr "{0} already exists, skipping download"
|
||||
|
||||
@ -181,7 +181,7 @@ msgstr ""
|
||||
msgid "查看详细参数说明"
|
||||
msgstr ""
|
||||
|
||||
msgid "网络异常,请求 {0} 失败"
|
||||
msgid "网络异常,{0} 请求失败: {1}"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0} 文件已存在,跳过下载"
|
||||
|
||||
@ -135,7 +135,7 @@ class Download:
|
||||
logging(
|
||||
log,
|
||||
self.message(
|
||||
"网络异常,{0} 请求失败,错误信息: {1}").format(name, error),
|
||||
"网络异常,{0} 请求失败,错误信息: {1}").format(name, repr(error)),
|
||||
ERROR,
|
||||
)
|
||||
logging(
|
||||
@ -170,7 +170,7 @@ class Download:
|
||||
logging(
|
||||
log,
|
||||
self.message(
|
||||
"网络异常,{0} 下载失败,错误信息: {1}").format(name, error),
|
||||
"网络异常,{0} 下载失败,错误信息: {1}").format(name, repr(error)),
|
||||
ERROR,
|
||||
)
|
||||
logging(
|
||||
|
||||
@ -35,9 +35,11 @@ class Html:
|
||||
response = await self.__request_url_head(url, headers, **kwargs, )
|
||||
return str(response.url)
|
||||
except HTTPError as error:
|
||||
logging(log, str(error), ERROR)
|
||||
logging(
|
||||
log, self.message("网络异常,请求 {0} 失败").format(url), ERROR)
|
||||
log,
|
||||
self.message("网络异常,{0} 请求失败: {1}").format(url, repr(error)),
|
||||
ERROR
|
||||
)
|
||||
return ""
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user