scrapy爬虫错误记录

相关包的版本
在这里插入图片描述

twisted.internet.error.TCPTimedOutError: TCP connection timed out: 10060: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败

原因:被检测到为爬虫
解决:爬虫时间设置为白天

[<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.>]
解决方案:setting设置useragent(https://github.com/scrapy/scrapy/issues/2513,https://stackoverflow.com/questions/40665120/under-what-circumstances-does-scrapy-throw-a-connection-was-closed-cleanly-err)

[<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]
解决方案https改为http,(https://newbedev.com/python-twisted-web-newclient-responseneverreceived-twisted-python-failure-failure-twisted-internet-error-connectionlost-connection-to-the-other-side-was-lost-in-a-no-n-clean-fashion-connection-lost-code-example)
使用虚拟环境让cryptography包版本<2
换代理(不是这个原因,https://support.zyte.com/support/discussions/topics/22000009971)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值