import requests def get_login():#用于测试的登录 url='http://ip地址/auth/app/whiteApi/v1/login' data={"password": "dc483e80a7a0bd9ef71d8cf973673","username": "15576152006"} headers = {'Content-Type': 'application/json;charset=UTF-8'}#请求头 a= requests.request("post",url,json=data,headers=headers) return (a.json()['data']['access_token']) token=str(get_login()) print(token,"确认token成功返回")