forked from asian3/v2freecheckin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
40 lines (34 loc) · 1.22 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import requests
import time
import argparse
def main(usr, pw):
client = requests.Session()
login_url = "https://w1.v2free.top/auth/login"
sign_url = "https://w1.v2free.top/user/checkin"
data = {
"email": usr,
"passwd": pw,
"code": "",
}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/76.0",
"Referer": "https://w1.v2free.top/auth/login",
}
client.post(login_url, data=data, headers=headers)
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/76.0",
"Referer": "https://w1.v2free.top/user",
}
response = client.post(sign_url, headers=headers)
msg = usr + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
if response.status_code == 200:
msg += '签到成功'
else:msg += '签到失败'
return msg
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='V2free签到脚本')
parser.add_argument('--username', type=str, help='账号')
parser.add_argument('--password', type=str, help='密码')
args = parser.parse_args()
msg = main(args.username,args.password)
print(msg)