&引用;“连接中止”;使用Python请求时出错

&引用;“连接中止”;使用Python请求时出错,python,web-scraping,python-requests,Python,Web Scraping,Python Requests,我正试图用以下代码从家乐福网站上获取价格信息 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36', } link = 'https://www.carrefour.es/extensor-tp-link-rango-75/366506176

我正试图用以下代码从家乐福网站上获取价格信息

headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
    }
link = 'https://www.carrefour.es/extensor-tp-link-rango-75/366506176/p'
response = requests.get(link, headers=headers, timeout=60)
# Following lines parse response with Beautifulsoup
此代码以“连接中止”错误结束。Linux和Windows上的错误消息不同

在AWS(Ubuntu)上运行时,它总是会导致错误,并显示以下消息

requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
在我的电脑(Win10)上运行时,有时工作正常,有时出错,并显示以下消息

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
我想这不是由IP限制或用户代理造成的:虽然脚本导致无法连接,但我仍然可以使用我的PC(Win10)访问链接,使用相同的IP和用户代理

我被封锁了吗?被封锁的可能原因是什么