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

Function collect_post

wxapp/BREO.py:262–282  ·  view source on GitHub ↗
(token, post_id)

Source from the content-addressed store, hash-verified

260 return None
261
262def collect_post(token, post_id):
263 url = "https://breoplus.breo.cn/breo-app/communityBaseInfo/collect"
264 headers = breo_task_headers(token)
265 data = {
266 "postId": post_id
267 }
268 try:
269 response = requests.post(url, headers=headers, data=json.dumps(data))
270 if response.status_code == 200:
271 result = response.json()
272 if result.get("success", False):
273 print("✅ 收藏成功!")
274 reward = result.get("result") or {}
275 print(f"获得点数: {reward.get('point', 0)}")
276 print(f"成长值: {reward.get('grow', 0)}")
277 else:
278 print(f"❌ 收藏失败,错误信息:{result.get('message', '未知错误')}")
279 else:
280 print(f"❌ 请求失败,状态码:{response.status_code}")
281 except Exception as e:
282 print(f"❌ 请求错误: {e}")
283
284def comment_post(token, post_id):
285 for _ in range(2): # 评论2次

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