python在抓取制定網站的錯誤提示:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)python
解決方式:
在使用請求方法時添加一個參數verify = false就好了,以下:session
response = self.lagou_session.get(url=url,headers=self.header,verify=False)ide
或post
res = requests.post(url, data = textmod, headers = header_dict, verify=False)網站