| 107 | # 每日签到 |
| 108 | # 位置: APP → 我的 → 签到 |
| 109 | def signIn(self): |
| 110 | signInData = self.taskData['userReportInfoForm'] # 签到数据源 |
| 111 | if signInData['status'] == 0 : |
| 112 | for each in signInData['gifts']: |
| 113 | if each['today'] == True: |
| 114 | url = 'https://store.oppo.com/cn/oapi/credits/web/report/immediately' |
| 115 | headers = { |
| 116 | 'Host': 'store.oppo.com', |
| 117 | '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', |
| 118 | 'Content-Type': 'application/x-www-form-urlencoded', |
| 119 | 'Connection': 'keep-alive', |
| 120 | 'Accept-Language': 'zh-CN,en-US;q=0.9', |
| 121 | 'Accept-Encoding': 'gzip, deflate, br', |
| 122 | 'referer':'https://store.oppo.com/cn/app/taskCenter/index' |
| 123 | } |
| 124 | data = { |
| 125 | 'amount': each['credits'] |
| 126 | } |
| 127 | while True: |
| 128 | response = self.sess.post(url=url, headers=headers,data=data).json() |
| 129 | if response['code'] == 200: |
| 130 | notify(f"{self.dic['user']}\t签到结果:{response['data']['message']}") |
| 131 | break |
| 132 | elif response['code'] == 1000005: |
| 133 | data = { |
| 134 | 'amount': each['credits'], |
| 135 | 'type': each['type'], |
| 136 | 'gift': each['gift'] |
| 137 | } |
| 138 | else: |
| 139 | notify(f"{self.dic['user']}\t签到结果:{response['errorMessage']}") |
| 140 | break |
| 141 | elif signInData['status'] == 1: |
| 142 | notify(f"{self.dic['user']}\t今日已签到") |
| 143 | else: |
| 144 | notify(f"{self.dic['user']}\t未知错误") |
| 145 | |
| 146 | # 秒杀详情页获取商品数据 |
| 147 | def getGoodMess(self,count=10): |