标签:api ons page int requests log port ica basic
Requests 库有一个auth 模块专门用来处理HTTP 认证:
import requests
from requests.auth import AuthBase
from requests.auth import HTTPBasicAuth
auth = HTTPBasicAuth(‘ryan‘, ‘password‘)
r = requests.post(url="http://pythonscraping.com/pages/auth/login.php", auth=auth)
print(r.text)
标签:api ons page int requests log port ica basic
原文地址:https://www.cnblogs.com/yrm1160029237/p/6402662.html