fix douban test

This commit is contained in:
jxxghp
2025-05-09 20:14:33 +08:00
parent a0ddfe173b
commit 9de3cb0f92
+3 -5
View File
@@ -39,11 +39,9 @@ class DoubanModule(_ModuleBase):
测试模块连接性 测试模块连接性
""" """
ret = RequestUtils().get_res("https://movie.douban.com/") ret = RequestUtils().get_res("https://movie.douban.com/")
if ret and ret.status_code == 200: if ret is None:
return True, "" return False, "豆瓣网络连接失败"
elif ret: return True, ""
return False, f"无法连接豆瓣,错误码:{ret.status_code}"
return False, "豆瓣网络连接失败"
def init_setting(self) -> Tuple[str, Union[str, bool]]: def init_setting(self) -> Tuple[str, Union[str, bool]]:
pass pass