diff --git a/package.v2.json b/package.v2.json index 0172cf5..776dfee 100644 --- a/package.v2.json +++ b/package.v2.json @@ -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!", diff --git a/plugins.v2/autosignin/__init__.py b/plugins.v2/autosignin/__init__.py index a8e5700..1c9bc20 100644 --- a/plugins.v2/autosignin/__init__.py +++ b/plugins.v2/autosignin/__init__.py @@ -35,7 +35,7 @@ class AutoSignIn(_PluginBase): # 插件图标 plugin_icon = "signin.png" # 插件版本 - plugin_version = "2.8" + plugin_version = "2.8.1" # 插件作者 plugin_author = "thsrite" # 作者主页 diff --git a/plugins.v2/autosignin/sites/rousipro.py b/plugins.v2/autosignin/sites/rousipro.py index 66ec3e4..71d4179 100644 --- a/plugins.v2/autosignin/sites/rousipro.py +++ b/plugins.v2/autosignin/sites/rousipro.py @@ -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: