Conditions | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
17 | @staticmethod |
||
18 | def checkin(authorization): |
||
19 | url = "http://n.cg.163.com/api/v2/sign-today" |
||
20 | headers = { |
||
21 | "user-agent": "Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) " |
||
22 | "AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 " |
||
23 | "Chrome/85.0.4183.127 Mobile Safari/537.36", |
||
24 | "authorization": authorization, |
||
25 | } |
||
26 | res = requests.post(url, headers=headers).text |
||
27 | return "cookie 已失效" if res[0] == "{" else "签到成功" |
||
28 | |||
43 |