Files
python----/智慧校园/本部/生成本周课程表.ipynb
T
admin 9fb191884e feat: 新增批量数据处理脚本并更新考勤脚本配置
- 更新考勤jupyter notebook的登录账号、密码与请求方式
- 新增Dify API调用脚本test.py用于测试对话请求
- 新增database.py实现批量格式化处理教学计划数据并生成更新SQL
2026-06-16 21:00:55 +08:00

1.9 KiB

In [3]:
from requests import get,post
import time
ip = "http://band.hxzhxy.cn"
# ip = "http://192.168.0.244:8100"

param = {
    "username": "xtl",
    "password": "xia123456",
    "client_id": "client",
    "grant_type": "password",
    "client_secret": "123456",
}
data = get(url=f"http://band.hxzhxy.cn/oauth/token",params=param).json()
token = data["access_token"]
header = {
    "content-type": "application/json",
    "authorization": f"Bearer {token}",
}
In [4]:
for i in range(24,27):
    post(f"{ip}/classAttendStu/createThisWeek",headers=header,params={"planId":i},timeout=600).text
In [6]:
post(f"{ip}/classAttendStu/createThisWeek",headers=header,params={"planId":46},timeout=600).text
Out [6]:
'{"success":true,"msg":"操作成功","code":0,"data":null}'