| 153 | time.sleep(random.randint(3,5)) |
| 154 | |
| 155 | def getBattleList(self): |
| 156 | aid = 1582 # 抓包结果为固定值:1582 |
| 157 | url = 'https://hd.oppo.com/task/list' |
| 158 | headers = { |
| 159 | 'Host':'hd.oppo.com', |
| 160 | 'Connection': 'keep-alive', |
| 161 | 'Referer':'https://hd.oppo.com/act/m/2021/2021/realmejifendalu/index.html', |
| 162 | 'Accept-Encoding': 'gzip, deflate', |
| 163 | 'Accept-Language': 'zh-CN,en-US;q=0.9', |
| 164 | } |
| 165 | params = { |
| 166 | 'aid':aid |
| 167 | } |
| 168 | response = self.sess.get(url=url,headers=headers,params=params).json() |
| 169 | time.sleep(random.randint(3,5)) |
| 170 | if response['no'] == '200': |
| 171 | self.taskData = response['data'] |
| 172 | return True |
| 173 | else: |
| 174 | notify(f"{response['msg']}") |
| 175 | return False |
| 176 | |
| 177 | def runBattleTask(self): |
| 178 | for each in self.taskData: |