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

Method clockIn

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

Source from the content-addressed store, hash-verified

336
337 # 赚积分 -> 每日打卡
338 def clockIn(self,dic):
339 aid = 1418
340 url = 'https://hd.oppo.com/task/finish'
341 headers = {
342 'Host': 'hd.oppo.com',
343 'Connection': 'keep-alive',
344 'Accept': '*/*',
345 'Origin': 'https://hd.oppo.com',
346 'X-Requested-With': 'XMLHttpRequest',
347 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
348 'Referer': 'https://hd.oppo.com/act/m/2021/2021/realmejifendalu/index.html',
349 'Accept-Encoding': 'gzip, deflate',
350 'Accept-Language': 'zh-CN,en-US;q=0.9'
351 }
352 data = {
353 'aid': aid,
354 't_index': dic['t_index']
355 }
356 response = self.sess.post(url=url,headers=headers,data=data).json()
357 if response['no'] == '200':
358 notify(f"[{dic['title']}]\t{response['msg']}")
359 self.receiveAward(dic)
360 else:
361 notify(f"[{dic['title']}]\t{response['msg']}")
362 time.sleep(random.randint(3,5))
363
364 # 领取奖励
365 def receiveAward(self,dic):

Callers 1

runEarnPointMethod · 0.95

Calls 2

receiveAwardMethod · 0.95
notifyFunction · 0.70

Tested by

no test coverage detected