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

Function cscscs

wxapp/quanmianshidai.py:547–563  ·  view source on GitHub ↗
(code, token)

Source from the content-addressed store, hash-verified

545 print(f"请求失败: {e}")
546
547def cscscs(code, token):
548 url = "https://sg01.purcotton.com/api/statistics/store"
549 headers = create_headers(code, token)
550 _, user_id = login(code, token) # 调用login函数,忽略电话号码,只获取user_id
551 data = {
552 "uid": user_id,
553 "type": 301 # 确保这里的值符合API的要求
554 }
555 #print(data) # 打印整个响应数据
556 try:
557 response = requests.post(url, headers=headers, json=data)
558 response.raise_for_status() # 检查HTTP响应状态
559
560 response_data = response.json()
561 #print(response_data) # 打印整个响应数据
562 except requests.exceptions.RequestException as e:
563 print(f"请求失败: {e}")
564
565# 阳光
566

Callers 1

mainFunction · 0.85

Calls 4

create_headersFunction · 0.85
loginFunction · 0.70
printFunction · 0.50
postMethod · 0.45

Tested by

no test coverage detected