Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 pycurl 从 Twitter Streaming API 中抓取数据。然而,几个小时后,连接就挂在那里了。
有没有办法检测到这个并退出程序?我知道 pycurl 有 TIMEOUT 和 CONNECTTIMEOUT,但这两个参数不适用。
您是否遇到异常或其他情况,您能否添加一些代码?:) 也许你应该考虑使用像 httplib 这样的另一个模块(如果你想使用 SSL/TLS,你可以创建一个新的套接字并用你的安全包装套接字覆盖 httplib 的连接函数:))