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

Function punch_in

wxapp/BREO.py:332–349  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

330 print(f"❌ 请求错误: {e}")
331
332def punch_in(token):
333 url = "https://breoplus.breo.cn/breo-app/user/po-task-info/punch"
334 headers = breo_task_headers(token)
335 try:
336 response = requests.post(url, headers=headers)
337 if response.status_code == 200:
338 result = response.json()
339 if result.get("success", False):
340 print("✅ 签到成功!")
341 reward = result.get("result") or {}
342 print(f"获得点数: {reward.get('point', 0)}")
343 print(f"成长值: {reward.get('grow', 0)}")
344 else:
345 print(f"❌ 签到失败,错误信息:{result.get('message', '未知错误')}")
346 else:
347 print(f"❌ 请求失败,状态码:{response.status_code}")
348 except Exception as e:
349 print(f"❌ 请求错误: {e}")
350
351if __name__ == "__main__":
352 # 获取公告

Callers 1

BREO.pyFile · 0.85

Calls 4

breo_task_headersFunction · 0.85
printFunction · 0.50
postMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected