MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / main

Function main

daily/360.py:120–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 return self.submit_checkin(formhash)
119
120def 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
148if __name__ == "__main__":
149 main()

Callers 1

360.pyFile · 0.70

Calls 3

runMethod · 0.95
BBS360CheckinClass · 0.85
printFunction · 0.70

Tested by

no test coverage detected