我的代码返回一条错误消息,但我不知道为什么,我之前已经多次执行相同的逻辑,但从未发生过这样的事情,代码如下:
import requests
from bs4 import BeautifulSoup
site = 'https://www.fea.usp.br/internacional/universidades-conveniadas?pais=All'
req = requests.get(site)
错误信息:
- SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
- MaxRetryError: HTTPSConnectionPool(host='www.fea.usp.br', port=443): Max retries exceeded with url: /internacional/universidades-conveniadas?pais=All (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
- SSLError: HTTPSConnectionPool(host='www.fea.usp.br', port=443): Max retries exceeded with url: /internacional/universidades-conveniadas?pais=All (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
答案 0 :(得分:0)