首页 > 解决方案 > 如果请求太长,电子商务中的美丽汤单就会损坏

问题描述

我需要从电子商务中抓取 60 种产品的 30 页。( 1800 个网址,每个产品输入 6 个数据(价格、解密等)。

如果只要求刮 10 页,但如果要求 30 页则被此错误消息打断。

我已经包含 sleep(randint(5,10)) 以避免被网页阻止但无法正常工作。

在请求函数中包含我在 Windows 中的 Edge 标头。(在我的工作中,我们必须使用代理与 python 的外部链接连接。(希望不是原因!)

关于如何避免此错误的任何想法?

**ProxyError:** HTTPSConnectionPool(host='www.mywebscrp.com.pa', port=443): Max retries exceeded with url: 
//collections/tools/products/drils (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

标签: beautifulsoup

解决方案


推荐阅读