Files
python----/智慧校园/本部/生成本周课程表.ipynb
T
2025-10-20 12:32:18 +08:00

2.5 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 [2]:
for i in range(24,27):
    print(post(f"{ip}/classAttendStu/createThisWeek",headers=header,params={"planId":i},timeout=600).text)
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.0</center>
</body>
</html>

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.0</center>
</body>
</html>

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.0</center>
</body>
</html>

In [ ]: