MCPcopy
hub / github.com/linbailo/zyqinglong / get_SignTaskList

Method get_SignTaskList

SFSY.py:190–224  ·  view source on GitHub ↗
(self, END=False)

Source from the content-addressed store, hash-verified

188 print(f'超值福利签到失败: {error_message}')
189
190 def get_SignTaskList(self, END=False):
191 if not END: print(f'>>>开始获取签到任务列表')
192 json_data = {
193 'channelType': '3',
194 'deviceId': self.get_deviceId(),
195 }
196 url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~integralTaskStrategyService~queryPointTaskAndSignFromES'
197 response = self.do_request(url, data=json_data)
198 # print(response)
199 if response.get('success') == True and response.get('obj') != []:
200 totalPoint = response["obj"]["totalPoint"]
201 if END:
202 Log(f'当前积分:【{totalPoint}】')
203 return
204 Log(f'执行前积分:【{totalPoint}】')
205 for task in response["obj"]["taskTitleLevels"]:
206 self.taskId = task["taskId"]
207 self.taskCode = task["taskCode"]
208 self.strategyId = task["strategyId"]
209 self.title = task["title"]
210 status = task["status"]
211 skip_title = ['用行业模板寄件下单', '去新增一个收件偏好', '参与积分活动']
212 if status == 3:
213 print(f'>{self.title}-已完成')
214 continue
215 if self.title in skip_title:
216 print(f'>{self.title}-跳过')
217 continue
218 else:
219 # print("taskId:", taskId)
220 # print("taskCode:", taskCode)
221 # print("----------------------")
222 self.doTask()
223 time.sleep(3)
224 self.receiveTask()
225
226 def doTask(self):
227 print(f'>>>开始去完成【{self.title}】任务')

Callers 1

mainMethod · 0.95

Calls 6

get_deviceIdMethod · 0.95
do_requestMethod · 0.95
doTaskMethod · 0.95
receiveTaskMethod · 0.95
LogFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected