python3
import base64 userpass = username + ':' + password encoded_u = base64.b64encode(userpass.encode()).decode() headers = {"Authorization" : "Basic %s" % encoded_u}
参考
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/288757.html
python3
import base64 userpass = username + ':' + password encoded_u = base64.b64encode(userpass.encode()).decode() headers = {"Authorization" : "Basic %s" % encoded_u}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/288757.html