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

Method getDailyCashTask

DailyCash.py:172–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170
171 # 天天领取现金
172 def getDailyCashTask(self):
173 url = 'https://store.oppo.com/cn/oapi/omp-web/web/dailyCash/queryActivityReward'
174 headers = {
175 'Host': 'store.oppo.com',
176 'Connection': 'keep-alive',
177 'source_type': '501',
178 'clientPackage': 'com.oppo.store',
179 'Accept': 'application/json, text/plain, */*',
180 'Referer': 'https://store.oppo.com/cn/app/cashRedEnvelope?activityId=1&us=shouye&um=xuanfu&uc=xianjinhongbao',
181 'Accept-Encoding': 'gzip, deflate',
182 'Accept-Language': 'zh-CN,en-US;q=0.9'
183 }
184 params = {
185 'activityId':1
186 }
187 response = self.sess.get(url=url,headers=headers,params=params).json()
188 if response['code'] == 200:
189 self.taskRewardList = response['data']['taskRewardList']
190 self.timingRewardList = response['data']['timingRewardList']
191 return True
192 elif response['code'] == 1000001:
193 notify(response['errorMessage'])
194 return False
195
196 # 天天领现金浏览模板
197 def viewCashTask(self,dic):

Callers 1

startMethod · 0.95

Calls 1

notifyFunction · 0.70

Tested by

no test coverage detected