| 82 | # 报名或打卡 |
| 83 | # 报名或打卡是同一个链接,配合Linux定时系统 |
| 84 | def early(self): |
| 85 | url = 'https://store.oppo.com/cn/oapi/credits/web/clockin/applyOrClockIn' |
| 86 | headers = {'Host': 'store.oppo.com', |
| 87 | 'Connection': 'keep-alive', |
| 88 | 'source_type': '501', |
| 89 | 'clientPackage': 'com.oppo.store', |
| 90 | 'Accept': 'application/json, text/plain, */*', |
| 91 | 'Referer': 'https://store.oppo.com/cn/app/cardingActivities?us=gerenzhongxin&um=hudongleyuan&uc=zaoshuidaka', |
| 92 | 'Accept-Encoding': 'gzip, deflate', |
| 93 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' |
| 94 | } |
| 95 | response = self.sess.get(url=url,headers=headers).json() |
| 96 | if response['code'] == 200: |
| 97 | if response['data']['clockInStatus'] == 0: |
| 98 | if response['data']['applyStatus'] == 0: |
| 99 | notify(f"{self.dic['user']}\t积分过少,取消报名!") |
| 100 | elif response['data']['applyStatus'] == 1: |
| 101 | notify(f"{self.dic['user']}\t报名成功!") |
| 102 | elif response['data']['applyStatus'] == 2: |
| 103 | notify(f"{self.dic['user']}\t已报名!") |
| 104 | elif response['data']['clockInStatus'] == 1: |
| 105 | notify(f"{self.dic['user']}\t早睡瓜分积分,打卡成功!") |
| 106 | elif response['data']['clockInStatus'] == 2: |
| 107 | notify(f"{self.dic['user']}\t早睡瓜分积分,已成功打卡!") |
| 108 | elif response['code'] == 1000005: |
| 109 | notify(f"{self.dic['user']}\t{response['errorMessage']}") |
| 110 | |
| 111 | # 执行欢太商城实例对象 |
| 112 | def start(self): |