设置allow_redirects即可 html = requests.post(url,data=postdata,headers=headersLogin,allow_redirects=False)