beautifulsoup - 如果请求太长,电子商务中的美丽汤单就会损坏
问题描述
我需要从电子商务中抓取 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')))
解决方案
推荐阅读
- javascript - 如何使用整数作为 JSON 对象键
- java - 运行 Spring Boot JPA 测试时,数据库中没有保留任何值
- python - 如何在 Jenkins 的无 GUI 模式下在锁定的远程机器上成功运行 AutoIT 脚本?
- python - AttributeError:“复合”对象在 vpython.py 中没有属性“_origin”
- python - ds = data_set(sys.argv[1]) IndexError: 列表索引超出范围
- docker - 使用 docker 的 Traefik 配置文件位置
- sql - 带有时区的intellij sql错误
- jssor - Jssor Slider - 图像滑块(无法拖动图片)在重新创建滑块后不起作用
- sql - 如何使用 API 在 SQL 管理中获取和验证用户名和密码?
- jquery - jQuery 数据表中的上一个、下一个链接看起来太近了