Files
python----/智慧校园/百仁/建班级.ipynb
T
2025-10-20 12:32:18 +08:00

2.1 KiB

In [1]:
from requests import get,post
import time
ip = "http://band.hxzhxy.cn"
param = {
    "username": "zhongwei",
    "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(1,13):
    post(f"https://band.hxzhxy.cn/uc/class/add?access_token={token}",json={"gradeId":129,"teamId":110,"className":f"导师{i}","enabled":True})
在当前单元格或上一个单元格中执行代码时 Kernel 崩溃。

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

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

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