requests登录路由器
requests登录路由器:
import requests import requests.auth #auth 代表登录 #路由器在登录的时候会在网页 弹出一个框 让输入用户名和密码 #登录路由器 auth=requests.auth.HTTPBasicAuth("ryan","password") req=requests.post(url="http://pythonscraping.com/pages/auth/login.php",auth=auth) print(req.text)