我正在尝试创建一个脚本,以从代码中显示的域的不同页面下载多个pdf。但是,我无法进入包含pdf的页面。 GET请求后,我得到了状态码302。有什么我想念的吗?
login_url = 'https://www.kobelco-kenki.com/Auth/Login.aspx?ShowLoginPage&ReturnUrl=/en/exservice/control/home.asp'
payload = {
'Login1&UserName':'username',
'Login1&Password':'password',
}
session_requests = requests.Session()
result = session_requests.post(
login_url,
data = payload,
# headers = dict(referer='https://www.kobelco-kenki.com/'),
verify=False
)
target_url = 'https://www.kobelco-kenki.com/en/exservice/ShopManual/c_crane.asp'
data = session_requests.get(
target_url,
verify=False,
allow_redirects=True,
)