63 lines
2.3 KiB
Python
63 lines
2.3 KiB
Python
# !/usr/bin/python3
|
|
# -- coding: utf-8 --
|
|
|
|
# cron: 16 9 * * *
|
|
# const $ = new Env("oai.itsfurry");
|
|
|
|
# 多账号换行隔开
|
|
# id是账号id cookie是登录后的cookie
|
|
# export itsfurry_ck="id@token"
|
|
|
|
|
|
import requests
|
|
import json
|
|
import os
|
|
import urllib3
|
|
|
|
# urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
|
|
# itsfurry_ck = os.getenv("itsfurry_ck").split('\n')
|
|
itsfurry_ck = [
|
|
'143@p_uv_id=2fe3c33823d1af7a7e9f3489122210ba; session=MTcyNTg0ODgwNnxEWDhFQVFMX2dBQUJFQUVRQUFEX3dfLUFBQVlHYzNSeWFXNW5EQkFBRG14cGJuVjRaRzlmWlc1aFlteGxCR0p2YjJ3Q0FnQUJCbk4wY21sdVp3d05BQXR2WVhWMGFGOXpkR0YwWlFaemRISnBibWNNRGdBTWVIbEdlalptTXpGU04wVm5Cbk4wY21sdVp3d0VBQUpwWkFOcGJuUUVCQUQtQVI0R2MzUnlhVzVuREFvQUNIVnpaWEp1WVcxbEJuTjBjbWx1Wnd3TkFBdHNhVzUxZUdSdlh6RTBNd1p6ZEhKcGJtY01CZ0FFY205c1pRTnBiblFFQWdBQ0JuTjBjbWx1Wnd3SUFBWnpkR0YwZFhNRGFXNTBCQUlBQWc9PXw3dMmavLws8RKBGHZ2zH5BIvsqH6oJuCV6Zfb8c9m4Rg==']
|
|
|
|
|
|
def to_sign():
|
|
url = "https://oai.itsfurry.com/api/user/signing"
|
|
datas = json.dumps({
|
|
"id": 143
|
|
})
|
|
|
|
response = requests.request("POST", url, headers=headers, data=datas)
|
|
print(response.text)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
# 遍历所有帐号
|
|
for i in range(len(itsfurry_ck)):
|
|
cookie = itsfurry_ck[i]
|
|
id = cookie.split('@')[0]
|
|
cookie = cookie.split('@')[1]
|
|
headers = {
|
|
'accept': 'application/json, text/plain, */*',
|
|
'accept-language': 'zh-CN,zh;q=0.9',
|
|
'cache-control': 'no-cache',
|
|
'content-type': 'application/json',
|
|
'cookie': cookie,
|
|
'new-api-user': id,
|
|
'origin': 'https://oai.itsfurry.com',
|
|
'pragma': 'no-cache',
|
|
'priority': 'u=1, i',
|
|
'referer': 'https://oai.itsfurry.com/token',
|
|
'sec-ch-ua': '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
|
|
'sec-ch-ua-mobile': '?0',
|
|
'sec-ch-ua-platform': '"Windows"',
|
|
'sec-fetch-dest': 'empty',
|
|
'sec-fetch-mode': 'cors',
|
|
'sec-fetch-site': 'same-origin',
|
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36'
|
|
}
|
|
print(f'开始第{i + 1}个帐号签到')
|
|
# 签到
|
|
if not to_sign():
|
|
continue
|