(self,dic)
| 363 | |
| 364 | # 领取奖励 |
| 365 | def receiveAward(self,dic): |
| 366 | aid = 1418 |
| 367 | url = 'https://hd.oppo.com/task/award' |
| 368 | headers = { |
| 369 | 'Host': 'hd.oppo.com', |
| 370 | 'Connection': 'keep-alive', |
| 371 | 'Accept': '*/*', |
| 372 | 'Origin': 'https://hd.oppo.com', |
| 373 | 'X-Requested-With': 'XMLHttpRequest', |
| 374 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', |
| 375 | 'Referer': 'https://hd.oppo.com/act/m/2021/jifenzhuanpan/index.html?us=gerenzhongxin&um=hudongleyuan&uc=yingjifen', |
| 376 | 'Accept-Encoding': 'gzip, deflate', |
| 377 | 'Accept-Language': 'zh-CN,en-US;q=0.9' |
| 378 | } |
| 379 | data = { |
| 380 | 'aid': aid, |
| 381 | 't_index': dic['t_index'] |
| 382 | } |
| 383 | response = self.sess.post(url=url,headers=headers,data=data).json() |
| 384 | if response['no'] == '200': |
| 385 | notify(f"[{dic['title']}]\t{response['msg']}") |
| 386 | else: |
| 387 | notify(f"[{dic['title']}]\t{response['msg']}") |
| 388 | time.sleep(random.randint(3,5)) |
| 389 | |
| 390 | # 跑任务中心 |
| 391 | # 位置:我的 -> 任务中心 |
no test coverage detected