import requests
data = {'username':'xxxxxxxxxx', 'password':'xxxxxxxxxx', 'iprange':'no'}
r = requests.post("https://xxx.edu.cn/cas/webLogin",data=data)
可以用
wget --post-data "username=xxxxxxxxxx&password=xxxxxxxxxx&iprange=no" https://xxx.edu.cn/cas/webLogin
也可以用
curl -X POST -D "username=xxxxxxxxxx&password=xxxxxxxxxx&iprange=no" https://xxx.edu.cn/cas/webLogin
curl -X POST -H "Content-Type:application/x-www-form-urlencoded" -D "username=xxxxxxxxxx&password=xxxxxxxxxx&iprange=no" https://xxx.edu.cn/cas/webLogin
curl -X POST -F "name=xxxxxxxx" -F passwd="xxx" -F ... https://xxx.edu.cn/cas/webLogin
这些格式怎么都不行... 请老司机指点!