我正在尝试从网站上抓取文本,并使用requests模块来实现。
以给定的代码为例(这里以Facebook为例)
requests.get('http://facebook.com')
我收到了以下错误信息:
SSLError: HTTPSConnectionPool(host='facebook.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
我已经尝试过以下方法,但没有成功:
pip install certifi
pip install certifi_win32
任何帮助都将不胜感激!谢谢!