缩减的代码,验证码获取那段删除了
import requests
payload = {
'__VIEWSTATE': "dDwyODE2NTM0OTg7Oz6axkqPO5u6m/sWzhMWZ6hy71QBYA==",
'txtUserName': "123456",
'TextBox2': "123456",
'txtSecretCode':"1234",
'RadioButtonList1': "学生",
'Button1:': '',
'lbLanguage': '',
'hidPdrs': '',
'hidsc': ''
}
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Language': 'zh-CN,zh;q=0.8',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded',
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36"
}
r =
requests.post("http://125.89.69.234/default2.aspx", headers = headers)
print(r.text)