fix(AutoSignIn): 更新站点 Rousi Pro 签到接口

This commit is contained in:
xiaoQQya
2026-01-25 14:27:32 +08:00
parent fdbd5ad501
commit c5afdfc2da
3 changed files with 6 additions and 5 deletions

View File

@@ -44,12 +44,13 @@
"name": "站点自动签到",
"description": "自动模拟登录、签到站点。",
"labels": "站点",
"version": "2.8",
"version": "2.8.1",
"icon": "signin.png",
"author": "thsrite",
"level": 2,
"release": true,
"history": {
"v2.8.1": "更新站点 Rousi Pro 签到接口",
"v2.8": "适配站点 Rousi Pro",
"v2.7": "站点请求使用站点设置的超时时间",
"v2.6": "感谢madrays佬提供的UI!",

View File

@@ -35,7 +35,7 @@ class AutoSignIn(_PluginBase):
# 插件图标
plugin_icon = "signin.png"
# 插件版本
plugin_version = "2.8"
plugin_version = "2.8.1"
# 插件作者
plugin_author = "thsrite"
# 作者主页

View File

@@ -57,10 +57,10 @@ class RousiPro(_ISiteSigninHandler):
json=body
)
if res is not None and res.status_code == 200 and "签到成功" in res.json().get("message", ""):
if res is not None and res.status_code == 200 and res.json().get("code", -1) == 0:
logger.info(f"{site} 签到成功")
return True, "签到成功"
elif res is not None and res.status_code == 400 and res.json().get("error", "") == "今日已签到":
elif res is not None and res.status_code == 400 and res.json().get("code", -1) == 1:
logger.info(f"{site} 今日已签到")
return True, "今日已签到"
elif res is not None and res.status_code == 401:
@@ -100,7 +100,7 @@ class RousiPro(_ISiteSigninHandler):
url="https://rousi.pro/api/points/attendance/stats"
)
if res is not None and res.status_code == 200 and "attended_dates" in res.json():
if res is not None and res.status_code == 200 and res.json().get("code", -1) == 0:
logger.info(f"{site} 模拟登录成功")
return True, "模拟登录成功"
elif res is not None and res.status_code == 401: