import requests Url = "http://xxxx/login" s = requests.Session()# posts.get(Url)# maybe, s.post(Url, data=data, json=json_data)print(s.cookies)