The Requests streaming example does not work in my environment

前端 未结 2 1913
说谎
说谎 2021-02-10 09:55

I\'ve been trying to consume the Twitter Streaming API using Python Requests.

There\'s a simple example in the documentation:

import requests
import jso         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-10 10:23

    Ah, I found the answer by reading the code. At some point, a prefetch parameter was added to the post method (and other methods, I assume).

    I just needed to add a prefetch=False kwarg to requests.post().

提交回复
热议问题