| 191 | time.sleep(random.randint(3,5)) |
| 192 | |
| 193 | def getBattleList(self): |
| 194 | aid = 1768 # 抓包结果为固定值:1582 |
| 195 | url = 'https://hd.oppo.com/task/list' |
| 196 | headers = { |
| 197 | 'Host':'hd.oppo.com', |
| 198 | 'Connection': 'keep-alive', |
| 199 | 'Referer':'https://hd.oppo.com/act/m/2021/2021/realmejifendalu/index.html', |
| 200 | 'Accept-Encoding': 'gzip, deflate', |
| 201 | 'Accept-Language': 'zh-CN,en-US;q=0.9', |
| 202 | } |
| 203 | params = { |
| 204 | 'aid':aid |
| 205 | } |
| 206 | response = self.sess.get(url=url,headers=headers,params=params).json() |
| 207 | time.sleep(random.randint(3,5)) |
| 208 | if response['no'] == '200': |
| 209 | self.taskData = response['data'] |
| 210 | return True |
| 211 | else: |
| 212 | notify(f"{response['msg']}") |
| 213 | return False |
| 214 | |
| 215 | def runBattleTask(self): |
| 216 | for each in self.taskData: |