【发布时间】:2019-09-14 09:19:03
【问题描述】:
我在网上搜索了很长时间。但是没有用。请帮助或尝试提供一些想法如何实现这一点。谢谢! 我想通过vs代码爬取https,但是运行代码的时候出现了错误。(在jupyter notebook中运行正常,我的python安装在E:/)
import requests
url = 'https://stackoverflow.com/'
res = requests.get(url)
requests.exceptions.SSLError:
HTTPSConnectionPool(host='stackoverflow.com', port=443): Max retries exceeded with url: / (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
【问题讨论】:
-
我也有同样的问题...在cmd中测试请求时可以,但是在vscode中失败。