MCPcopy Create free account
hub / github.com/Mashiro2000/HeyTapTask / viewCashTask

Method viewCashTask

DailyCash.py:197–220  ·  view source on GitHub ↗
(self,dic)

Source from the content-addressed store, hash-verified

195
196 # 天天领现金浏览模板
197 def viewCashTask(self,dic):
198 url = 'https://store.oppo.com/cn/oapi/credits/web/dailyCash/reportDailyTask'
199 param = {
200 'taskType':dic['taskType'],
201 'taskId':f"dailyCash{dic['id']}"
202 }
203 headers = {
204 'Host': 'store.oppo.com',
205 'Connection': 'keep-alive',
206 'source_type': '501',
207 'clientPackage': 'com.oppo.store',
208 'Cache-Control': 'no-cache',
209 'Accept': 'application/json, text/plain, */*',
210 'Referer': 'https://store.oppo.com/cn/app/cashRedEnvelope?activityId=1&us=shouye&um=xuanfu&uc=xianjinhongbao',
211 'Accept-Encoding': 'gzip, deflate',
212 'Accept-Language': 'zh-CN,en-US;q=0.9'
213 }
214 response = self.sess.get(url=url,headers=headers,params=param).json()
215 if response['code'] == 200:
216 notify(f"正在执行{dic['taskName']}...")
217 time.sleep(random.randint(5,7))
218 self.getCash(dic=dic)
219 else:
220 notify(f"{dic['taskName']}执行失败")
221
222
223 def runTaskRewardList(self):

Callers 1

runTaskRewardListMethod · 0.95

Calls 2

getCashMethod · 0.95
notifyFunction · 0.70

Tested by

no test coverage detected