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

Method getDailyCashTask

TimingCash.py:83–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81
82 # 天天领取现金
83 def getDailyCashTask(self):
84 url = 'https://store.oppo.com/cn/oapi/omp-web/web/dailyCash/queryActivityReward'
85 headers = {
86 'Host': 'store.oppo.com',
87 'Connection': 'keep-alive',
88 'source_type': '501',
89 'clientPackage': 'com.oppo.store',
90 'Accept': 'application/json, text/plain, */*',
91 'Referer': 'https://store.oppo.com/cn/app/cashRedEnvelope?activityId=1&us=shouye&um=xuanfu&uc=xianjinhongbao',
92 'Accept-Encoding': 'gzip, deflate',
93 'Accept-Language': 'zh-CN,en-US;q=0.9'
94 }
95 params = {
96 'activityId':1
97 }
98 response = self.sess.get(url=url,headers=headers,params=params).json()
99 if response['code'] == 200:
100 self.timingRewardList = response['data']['timingRewardList']
101 return True
102 elif response['code'] == 1000001:
103 notify(f"[定时红包]\t{response['errorMessage']}")
104 return False
105
106 def getCash(self,dic):
107 url = 'https://store.oppo.com/cn/oapi/omp-web/web/dailyCash/drawReward'

Callers 1

startMethod · 0.95

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected