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

Method getUserInfo_sec

daily/chinaUnicom.py:3712–3736  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3710 self.log(f"executeAllTasks_sec error: {e}")
3711
3712 def getUserInfo_sec(self):
3713 try:
3714 url = "https://m.jf.10010.com/jf-external-application/jftask/userInfo"
3715 headers = {
3716 "ticket": unquote(self.sec_ticket),
3717 "User-Agent": "Mozilla/5.0 (Linux; Android 9; ONEPLUS A5000 Build/PKQ1.180716.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.179 Mobile Safari/537.36",
3718 "partnersid": "1702",
3719 "clienttype": "uasp_unicom_applet",
3720 }
3721 if hasattr(self, 'sec_jeaId') and self.sec_jeaId:
3722 headers["Cookie"] = f"_jea_id={self.sec_jeaId}"
3723 res = self.session.post(url, json={}, headers=headers).json()
3724 if not res or res.get('code') != '0000' or not res.get('data'):
3725 self.log(f"安全管家: 查询积分失败: {res.get('msg') if res else '无响应'}")
3726 return
3727 currentPoints = int(res['data'].get('availableScore', 0))
3728 todayPoints = res['data'].get('todayEarnScore', 0)
3729 if not hasattr(self, 'sec_oldJFPoints') or self.sec_oldJFPoints is None:
3730 self.sec_oldJFPoints = currentPoints
3731 self.log(f"安全管家: 运行前积分:{currentPoints} (今日已赚 {todayPoints})")
3732 else:
3733 pointsGained = currentPoints - self.sec_oldJFPoints
3734 self.log(f"安全管家: 运行后积分{currentPoints},本次运行获得{pointsGained}", notify=True)
3735 except Exception as e:
3736 self.log(f"getUserInfo_sec error: {e}")
3737
3738 def securityButlerTask(self, is_query_only=False):
3739 self.log("==== 联通安全管家 ====")

Callers 1

securityButlerTaskMethod · 0.95

Calls 3

logMethod · 0.95
postMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected