Files
python----/达州/demo.ipynb
T
2025-10-20 12:32:18 +08:00

1.9 KiB

In [1]:
from requests import get,post
import time
ip = "http://192.168.0.209:8101"
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]:
from faker import Faker
fake = Faker('zh_CN')
In [3]:
fake.name()
Out [3]:
'刘想'
In [ ]: