1.4 KiB
1.4 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 [ ]: