我正在使用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服务器本身可能会强制关闭连接.
非常感谢你提前.