| 63 | |
| 64 | # 登录验证 |
| 65 | def login(self): |
| 66 | url = 'https://store.oppo.com/cn/oapi/users/web/member/check' |
| 67 | headers = { |
| 68 | 'Host': 'store.oppo.com', |
| 69 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', |
| 70 | 'Content-Type': 'application/x-www-form-urlencoded', |
| 71 | 'Connection': 'keep-alive', |
| 72 | 'Accept-Language': 'zh-cn', |
| 73 | 'Accept-Encoding': 'gzip, deflate, br', |
| 74 | } |
| 75 | response = self.sess.get(url=url,headers=headers).json() |
| 76 | if response['code'] == 200: |
| 77 | notify(f"{self.dic['user']}\t登录成功") |
| 78 | return True |
| 79 | else: |
| 80 | notify(f"{self.dic['user']}\t登录失败") |
| 81 | return False |
| 82 | |
| 83 | # 任务中心 |
| 84 | # 位置:我的 -> 任务中心 |