我有以下脚本:
import requests
payload = {'j_username': 'user', 'password': 'pass'}
with requests.Session() as s:
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36'}
p = s.post('https://idp.mls.ntreis.net/idp/Authn/UserPassword', data=payload,headers=headers)
r = s.get('https://ssoportal.mls.ntreis.net/')
print(r.text)
但是打印r.text
在没有登录的情况下向我显示https://idp.mls.ntreis.net/idp/Authn/UserPassword
的html来源
感谢您的帮助!