import requests
def login():
url = "http://58.87.96.193:8000/playground/login"
form_data = {
'uname':"admin",
'passsword': '123456'
}
resp = requests.post(url, data=form_data)
print(resp.text)
def cookie():
url = 'http://58.87.96.193:8000/playground/user_info'
cookie1 = {
'session':'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczNTcxNjE4OH0.nrMwxeKBx8rJ-VxVS0fcJDscxpJVgq9yAWn2Tzo-CXA',
'Max-Age':600,
'Path':'/',
'SameSite':'lax'
}
resp = requests.get(url, cookies=cookie1)
print(resp.text)
def get_info():
url = 'http://58.87.96.193:8000/playground/user_info'
cookie = 'session=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczNTcxNjE4OH0.nrMwxeKBx8rJ-VxVS0fcJDscxpJVgq9yAWn2Tzo-CXA'
header = {'cookie':cookie}
resp = requests.get(url, headers=header)
print(resp.text)
if __name__ == '__main__':
cookie()
三个函数都不能正常运行,是哪里出了问题呢