Python HTTPSConnectionPool错误
我正在尝试使用Python 3.x从特定网站上刮取数据,对于某些网站,它不允许我刮取数据,它显示了如下错误: raise ConnectionError(e,请求=请求) requests.exceptions.ConnectionError:HTTPSConnectionPool(主机=“…”,端口=443):url:/(由NewConnectionError引起)(“:无法建立新连接:[WinError 10060] 电子邮件验证也经常发生这种情况。我想知道如何处理此类错误以及解决方案是什么 谢谢你抽出时间 p.S.代码如下:Python HTTPSConnectionPool错误,python,web-scraping,httpconnection,Python,Web Scraping,Httpconnection,我正在尝试使用Python 3.x从特定网站上刮取数据,对于某些网站,它不允许我刮取数据,它显示了如下错误: raise ConnectionError(e,请求=请求) requests.exceptions.ConnectionError:HTTPSConnectionPool(主机=“…”,端口=443):url:/(由NewConnectionError引起)(“:无法建立新连接:[WinError 10060] 电子邮件验证也经常发生这种情况。我想知道如何处理此类错误以及解决方案是什么
enrich_url = "..."
ua = UserAgent()
header = {'user-agent':ua.chrome}
website = requests.get(enrich_url, headers=header) <--- (error is showing here)
soup = BeautifulSoup(website.content, 'html.parser')
enrich_url=“…”
ua=UserAgent()
header={'user-agent':ua.chrome}
website=requests.get(enrich_url,headers=header)发布引发此错误的代码。它不工作的网站用显示错误的部分更新了问题:-)