session を使い回すところがポイント
import requests session = requests.Session() url = "https://test.test/login" data = { "email": "mail@mail.mail", "password": "password", } ret = session.post(url=url, params=data) assert(ret.status_code==200) ret = session.get("https://test.test/data") with open("data.data", "w") as f: f.write(ret.text)