add first checkin code
This commit is contained in:
parent
85dcc75f85
commit
ac2cf55876
32
Checkin.py
Normal file
32
Checkin.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
cookies = {
|
||||||
|
'flarum_remember': 'JT5tSxOH0QzglSmU67Wq7ici6ecxhIc1U7pEOOOh',
|
||||||
|
'flarum_session': '1iM6ON0t2AVpZXmx9wKCGVSkjABGPIdEb1mQ1qH3'
|
||||||
|
}
|
||||||
|
|
||||||
|
headers = {
|
||||||
|
'Content-Type': 'application/vnd.api+json',
|
||||||
|
'X-Csrf-Token': 'fItVLFQnFMsWDQTiJQkWCOt1SEQPhQ5SHhpSbO88',
|
||||||
|
'X-Http-Method-Override': 'PATCH'
|
||||||
|
}
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'data': {
|
||||||
|
'type': 'users',
|
||||||
|
'attributes': {
|
||||||
|
'canCheckin': True,
|
||||||
|
'totalContinuousCheckIn': 2
|
||||||
|
},
|
||||||
|
'id': '1684'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
url = 'https://invites.fun/api/users/1684'
|
||||||
|
|
||||||
|
response = requests.post(url, json=data, headers=headers, cookies=cookies)
|
||||||
|
|
||||||
|
if response.status_code == 200:
|
||||||
|
print('签到成功!')
|
||||||
|
else:
|
||||||
|
print('签到失败。错误码:', response.status_code)
|
||||||
13
README.md
13
README.md
@ -0,0 +1,13 @@
|
|||||||
|
# catch-the-fish
|
||||||
|
|
||||||
|
https://invites.fun/ 签到脚本
|
||||||
|
|
||||||
|
使用方法
|
||||||
|
|
||||||
|
git clone http://q.3rd.hk:10000/Qubot/Checkin
|
||||||
|
|
||||||
|
cd Checkin
|
||||||
|
|
||||||
|
sudo chmod 777 check
|
||||||
|
|
||||||
|
./check
|
||||||
Loading…
x
Reference in New Issue
Block a user