from requests.auth import HTTPBasicAuth
from requests.auth import HTTPDigestAuth
r=requests.get(base_url+'basic_auth/51zxw/8888',auth=HTTPBasicAuth('51zxw','8888'))
print(r.text)
r=requests.get(base_url+'digest_auth/auth/zxw/666',auth=HTTPDigestAuth('zxw','666'))
print(r.text)
网友评论