我正在尝试通过使用方法请求POST登录网站。
ssn = requests.session()
data = {"LoginForm[email]":"gmail@gmail.com", "LoginForm[password]":"pw12345", "LoginForm[rememberMe]":0}
r = ssn.post("https://www.fshare.vn/site/login", data = data)
print(r.json)
# bound method Response.json of <Response [400]>
据我所知,我在数据中缺少一个值称为“ csrf-app”: HTTP Header POST : _csrf-app=gXvuYHZnQpoA37zC1Yncpb1BMstVUqRcVdj9x1QHJqK1AoYoHlUV21G9jaya0Jjy9iJRrz1_nRIft4ywO0RD-g==&LoginForm[email]=gmail@gmail.com&LoginForm[password]=pw12345&LoginForm[rememberMe]=0
那么如何获取此值““ csrf-app”以便将其与其他数据一起发布?