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

Method receiveAward

TaskCenter.py:365–388  ·  view source on GitHub ↗
(self,dic)

Source from the content-addressed store, hash-verified

363
364 # 领取奖励
365 def receiveAward(self,dic):
366 aid = 1418
367 url = 'https://hd.oppo.com/task/award'
368 headers = {
369 'Host': 'hd.oppo.com',
370 'Connection': 'keep-alive',
371 'Accept': '*/*',
372 'Origin': 'https://hd.oppo.com',
373 'X-Requested-With': 'XMLHttpRequest',
374 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
375 'Referer': 'https://hd.oppo.com/act/m/2021/jifenzhuanpan/index.html?us=gerenzhongxin&um=hudongleyuan&uc=yingjifen',
376 'Accept-Encoding': 'gzip, deflate',
377 'Accept-Language': 'zh-CN,en-US;q=0.9'
378 }
379 data = {
380 'aid': aid,
381 't_index': dic['t_index']
382 }
383 response = self.sess.post(url=url,headers=headers,data=data).json()
384 if response['no'] == '200':
385 notify(f"[{dic['title']}]\t{response['msg']}")
386 else:
387 notify(f"[{dic['title']}]\t{response['msg']}")
388 time.sleep(random.randint(3,5))
389
390 # 跑任务中心
391 # 位置:我的 -> 任务中心

Callers 3

viewGoodsMethod · 0.95
runEarnPointMethod · 0.95
clockInMethod · 0.95

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected