From ac2cf55876a90dde73ffc059ff638c11c36bc8c0 Mon Sep 17 00:00:00 2001 From: Qubot <1445788683@qq.com> Date: Sun, 11 Jun 2023 09:12:20 -0700 Subject: [PATCH] add first checkin code --- Checkin.py | 32 ++++++++++++++++++++++++++++++++ README.md | 13 +++++++++++++ check | 1 + 3 files changed, 46 insertions(+) create mode 100644 Checkin.py create mode 100755 check diff --git a/Checkin.py b/Checkin.py new file mode 100644 index 0000000..b256dda --- /dev/null +++ b/Checkin.py @@ -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) diff --git a/README.md b/README.md index e69de29..7428876 100644 --- a/README.md +++ b/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 diff --git a/check b/check new file mode 100755 index 0000000..2380745 --- /dev/null +++ b/check @@ -0,0 +1 @@ +python3 Checkin.py