1 Star 0 Fork 4

yangro/自用青龙脚本库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fsy.py 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
青铜少年 提交于 2023-10-25 14:42 . 测试更新
# coding=utf-8
"""
每日8:30
cron: 0 30 7 * * ?
new Env("飞速云机场")
"""
import requests
import notify
import utils.tool as TOOL
import utils.getCookie as getCookie
global msg
msg = """
名称|状态
:--:|:--:
"""
def main():
users = getCookie.GetQlEnvs().getCookies('FSY_COOKIE')
print("🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉\n")
print("获取到: " + str(len(users)) + " 个用户")
print("-------------------------------------------")
for user in users:
signIn(user)
# 签到
def signIn(user):
global msg
url = 'https://feisu261.xyz/user/checkin'
data = " "
headers = {
"Host": "feisu261.xyz",
"accept": "application/json, text/javascript, */*; q=0.01",
"origin": "https://feisu261.xyz",
"x-requested-with": "XMLHttpRequest",
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/79.0.3945.147 Safari/534.24 XiaoMi/MiuiBrowser/14.3.21",
"sec-fetch-site": "same-origin",
"sec-fetch-mode": "cors",
"referer": "https://feisu261.xyz/user",
"accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
"cookie": user['cookie']
}
res = requests.post(url=url, data=data, headers=headers)
json = res.json()
print(user['name'] + " ---> " + json['msg'] + "\n")
msg += user['name'] + "|" + json['msg'] + "\n\n"
print("-------------------------------------------\n")
main()
print("🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉")
notify.send("飞速云机场", msg)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yangro/ql.git
git@gitee.com:yangro/ql.git
yangro
ql
自用青龙脚本库
main

搜索帮助