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

Method runViewTask

BattleForRealMe.py:129–153  ·  view source on GitHub ↗
(self,dic=None)

Source from the content-addressed store, hash-verified

127
128 # # 直播,宠粉,浏览商品
129 def runViewTask(self,dic=None):
130 aid = 1582
131 url = 'https://hd.oppo.com/task/finish'
132 headers = {
133 'Host': 'hd.oppo.com',
134 'Connection': 'keep-alive',
135 'Accept': '*/*',
136 'Origin': 'https://hd.oppo.com',
137 'X-Requested-With': 'XMLHttpRequest',
138 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
139 'Referer': 'https://hd.oppo.com/act/m/2021/2021/realmejifendalu/index.html',
140 'Accept-Encoding': 'gzip, deflate',
141 'Accept-Language': 'zh-CN,en-US;q=0.9'
142 }
143 data = {
144 'aid': aid,
145 't_index': dic['t_index']
146 }
147 response = self.sess.post(url=url,headers=headers,data=data).json()
148 if response['no'] == '200':
149 notify(f"[{dic['title']}]\t{response['msg']}")
150 self.receiveAward(dic)
151 else:
152 notify(f"[{dic['title']}]\t{response['msg']}")
153 time.sleep(random.randint(3,5))
154
155 def getBattleList(self):
156 aid = 1582 # 抓包结果为固定值:1582

Callers 1

runBattleTaskMethod · 0.95

Calls 2

receiveAwardMethod · 0.95
notifyFunction · 0.70

Tested by

no test coverage detected