Conditions | 2 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
19 | @staticmethod |
||
20 | def sign(cookie): |
||
21 | url = "https://id.tool.lu/sign" |
||
22 | headers = { |
||
23 | "cookie": cookie, |
||
24 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) " |
||
25 | "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", |
||
26 | } |
||
27 | response = requests.get(url, headers=headers) |
||
28 | day = re.findall("你已经连续签到(.*),再接再厉!", response.text) |
||
29 | if len(day) == 0: |
||
30 | return "cookie 失效" |
||
31 | day = day[0].replace(" ", "") |
||
32 | return f"连续签到 {day}" |
||
33 | |||
48 |