1.查找form data
1)打开要登录的页面,按下F12,并点下登录按键
2)打开Network,并找到payload
2. 自动登录代码
1 import requests 2 3 # 下载页面 4 ssion = requests.session() 5 data = { 6 "username": "xxx", 7 "password": "xxx", 8 "IDButton": "Login", 9 "encoded": True, 10 "gx_charset": "UTF-8" 11 } 12 13 response = ssion.post("http://xxx", data) 14 print(response.text)