Files
python----/智慧校园/本部/生成本周课程表.ipynb
admin 411b96a60c chore: 批量更新脚本与数据处理优化
1. 调整database.py批量处理记录数为400
2. 新增convert_available.py用于将available字段的JSON数组格式转换为逗号分隔字符串
3. 更新test.py为数据库查询导出脚本
4. 生成并更新SQL更新语句文件
5. 修正jupyter notebook中的数据库连接配置与代码逻辑
2026-06-16 23:58:44 +08:00

2.2 KiB

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

param = {
    "username": "tangchao",
    "password": "123456a",
    "client_id": "client",
    "grant_type": "password",
    "client_secret": "123456",
}
data = get(url=f"http://band.hxzhxy.cn/oauth/token?username=zhongwei&password=123456a&client_id=client&grant_type=password&client_secret=123456").json()
token = data["access_token"]
header = {
    "content-type": "application/json",
    "authorization": f"Bearer {token}",
}
In [ ]:
for i in range(24,27):
    post(f"{ip}/classAttendStu/createThisWeek",headers=header,params={"planId":i},timeout=600).text
在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。

请查看单元格中的代码,以确定故障的可能原因。

单击<a href='https://aka.ms/vscodeJupyterKernelCrash'>此处</a>了解详细信息。

有关更多详细信息,请查看 Jupyter <a href='command:jupyter.viewOutput'>log</a>。
In [ ]: