我试图用Python 3.x从特定的网站上抓取数据,对于某些网站,它不允许我抓取,它显示的错误如下:
raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='....', port=443): Max retries exceeded with url: / (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060]
电子邮件验证也经常发生这种情况。我想知道如何处理这些错误,解决办法是什么?在
谢谢你抽出时间。在
p.S.代码如下:
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')
目前没有回答
相关问题 更多 >
编程相关推荐