session = requests.session()
session.cookies = cookielib.LWPCookieJar(filename="cookies.txt")
    response_text = session.post(post_url, data=post_data, headers=header)
    session.cookies.save()

//加载本地cookie

try:
    session.cookies.load(ignore_discard=True)
except:
    print ("cookie未能加载")