相关疑难解决方法(0)

python:[Errno 10054]远程主机强行关闭现有连接

我正在使用Twitter-py编写python来抓取Twitter空间.我已经将爬虫设置为在每次请求api.twitter.com之间休眠一会儿(2秒).但是,经过一段时间的运行(大约1),当Twitter的速率限制尚未超过时,我得到了这个错误.

[Errno 10054] An existing connection was forcibly closed by the remote host.
Run Code Online (Sandbox Code Playgroud)

这个问题的可能原因是什么以及如何解决这个问题?

我搜索过并发现由于许多请求,Twitter服务器本身可能会强制关闭连接.

非常感谢你提前.

python twitter web-crawler

31
推荐指数
3
解决办法
8万
查看次数

标签 统计

python ×1

twitter ×1

web-crawler ×1