Python中request的post請求報requests.exceptions.SSLError:


今天發送一個post請求,提示錯誤

requests.exceptions.SSLError: HTTPSConnectionPool(host='user.zaful.com', port=443): Max retries exceeded with url: /m-users-a-act_sign.htm (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))

 

解決方案,在請求時,關閉ssl鏈接’verify=False

url="https://user.XX.com/m-users-a-act_sign.htm"
        data={'pipeline':"zf",'email':'zhang123@qq.com','password':'zhang123'}
        head={"Accept": "application/json, text/javascript, */*; q=0.01"}
        result=requests.post(url,data=data,headers=head,verify=False)

  

 

登錄成功,問題解決

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM