Files
2025-10-20 12:32:18 +08:00

1.5 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 [4]:
for i in range(1,5):
    post(f"https://band.hxzhxy.cn/uc/class/add?access_token={token}",json={"gradeId":128,"teamId":119,"className":f"{i}","enabled":True})