0%

智慧曲园自动签到+微信推送

智慧曲园自动签到

https://github.com/polosec/qfnuAutoTemperatureSubmit

使用方法:

首先安装环境依赖 pip3 install requests

将该脚本上传至服务器 (我的路径是/root)

新建脚本 auto.sh

1
python3 /root/demo1.py xxxxx  xxxxxxx >1.txt ; python3 /root/serverjiang.py

新建定时任务

crontab -e 1 0 * * * /root/auto.sh

每天凌晨0点1分自动执行 /root/auto.sh 这条命令

绑定server酱

在server酱绑定微信后,拿到key,放到下面脚本 yourkey 这个地方。

serverjiang.py:

1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python

import requests,json
url="http://sc.ftqq.com/yourkey.send?text="
data=open('1.txt').readline()
data=json.loads(data)
data=data['message']
text=str(data)
desp="success"
url=url+text+"&desp="+desp
r=requests.get(url=url).text

运行结果

每天0点1分自动提交体温上报请求,并且将返回的信息(成功/错误)

分享