MCPcopy Index your code
hub / github.com/Mashiro2000/HeyTapTask / cashingCredits

Method cashingCredits

TaskCenter.py:279–302  ·  view source on GitHub ↗
(self,name,marking,type,amount)

Source from the content-addressed store, hash-verified

277
278 # 领取奖励
279 def cashingCredits(self,name,marking,type,amount):
280 url = 'https://store.oppo.com/cn/oapi/credits/web/credits/cashingCredits'
281 headers = {
282 'Host': 'store.oppo.com',
283 'Connection': 'keep-alive',
284 'Origin': 'https://store.oppo.com',
285 'clientPackage': 'com.oppo.store',
286 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
287 'Content-Type': 'application/x-www-form-urlencoded',
288 'Accept-Encoding': 'gzip, deflate',
289 'Accept-Language': 'zh-CN,en-US;q=0.9',
290 'Referer':'https://store.oppo.com/cn/app/taskCenter/index?us=gerenzhongxin&um=hudongleyuan&uc=renwuzhongxin'
291 }
292 data = {
293 'marking':marking,
294 'type':str(type),
295 'amount':str(amount)
296 }
297 response = self.sess.post(url=url,headers=headers,data=data).json()
298 if response['code'] == 200:
299 notify(f'{name}\t已领取奖励')
300 else:
301 notify(f'{name}\t领取失败')
302 time.sleep(random.randint(3,5))
303
304 # 赚积分(抽奖)任务
305 def runEarnPoint(self):

Callers 4

runViewTaskMethod · 0.95
viewGoodsMethod · 0.95
runShareTaskMethod · 0.95
shareGoodsMethod · 0.95

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected