0..abb=requests.post(url,headers=head1,data=aw) 会出现下面的错误提示:
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.。。。。.com', port=443): Max retries exceeded with url: /login.php (Caused by SLError(SSLCertVerificationError("hostname 'www.。。。.com'
上面提示解决方法:.abb=requests.post(url,headers=head1,data=aw,verify=False)
1.出现新的警告提示
Warning (from warnings module):
File "C:\python37\lib\site-packages\urllib3\connectionpool.py", line 1020
InsecureRequestWarning,
InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.。。。.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
2.abb=requests.post(url,headers=head1,data=aw,verify=False) #造成的
解决方法:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
即可
复制