()
| 118 | return self.submit_checkin(formhash) |
| 119 | |
| 120 | def main(): |
| 121 | # 青龙面板专用:从环境变量获取Cookie |
| 122 | cookie = os.getenv("BBS360_COOKIE", "").strip() |
| 123 | |
| 124 | if not cookie: |
| 125 | print("❌ 未设置环境变量 BBS360_COOKIE") |
| 126 | print("💡 请在青龙面板 → 环境变量 → 添加以下内容:") |
| 127 | print(" KEY: BBS360_COOKIE") |
| 128 | print(" VALUE: 从浏览器复制的完整Cookie(包含__cfduid, uid等)") |
| 129 | return |
| 130 | |
| 131 | # 青龙面板特殊处理:检测Cookie是否包含必要字段 |
| 132 | if "__cfduid" not in cookie or "uid" not in cookie: |
| 133 | print("❌ Cookie无效:缺少必要字段(需包含__cfduid和uid)") |
| 134 | print("💡 请重新复制Cookie:") |
| 135 | print(" 1. 登录 bbs.360.cn → F12 → Application → Cookies") |
| 136 | print(" 2. 复制 bbs.360.cn 下的所有Cookie字段") |
| 137 | return |
| 138 | |
| 139 | client = BBS360Checkin(cookie=cookie, timeout=20) |
| 140 | result = client.run() |
| 141 | |
| 142 | # 青龙面板专用输出格式 |
| 143 | if result.ok: |
| 144 | print(f"✅ 360签到成功 | {result.status} | {result.detail}") |
| 145 | else: |
| 146 | print(f"❌ 360签到失败 | {result.status} | {result.detail}") |
| 147 | |
| 148 | if __name__ == "__main__": |
| 149 | main() |
no test coverage detected