(self,dic)
| 336 | |
| 337 | # 赚积分 -> 每日打卡 |
| 338 | def clockIn(self,dic): |
| 339 | aid = 1418 |
| 340 | url = 'https://hd.oppo.com/task/finish' |
| 341 | headers = { |
| 342 | 'Host': 'hd.oppo.com', |
| 343 | 'Connection': 'keep-alive', |
| 344 | 'Accept': '*/*', |
| 345 | 'Origin': 'https://hd.oppo.com', |
| 346 | 'X-Requested-With': 'XMLHttpRequest', |
| 347 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', |
| 348 | 'Referer': 'https://hd.oppo.com/act/m/2021/2021/realmejifendalu/index.html', |
| 349 | 'Accept-Encoding': 'gzip, deflate', |
| 350 | 'Accept-Language': 'zh-CN,en-US;q=0.9' |
| 351 | } |
| 352 | data = { |
| 353 | 'aid': aid, |
| 354 | 't_index': dic['t_index'] |
| 355 | } |
| 356 | response = self.sess.post(url=url,headers=headers,data=data).json() |
| 357 | if response['no'] == '200': |
| 358 | notify(f"[{dic['title']}]\t{response['msg']}") |
| 359 | self.receiveAward(dic) |
| 360 | else: |
| 361 | notify(f"[{dic['title']}]\t{response['msg']}") |
| 362 | time.sleep(random.randint(3,5)) |
| 363 | |
| 364 | # 领取奖励 |
| 365 | def receiveAward(self,dic): |
no test coverage detected