iheb akermi
iheb akermi

Reputation: 9

Stream encountered HTTP error: 404 HTTP error response text

def start_streaming_tweets(self, search_term):
    self.filter(track=search_term, stall_warnings=True, languages=["en"])
        

if __name__ == '__main__':
    twitter_stream = TweetListener(consumerKey, consumerSecret, accessToken, accessTokenSecret)
    twitter_stream.start_streaming_tweets(search_term)"

and I got this error:

Stream encountered HTTP error: 404 HTTP error response text: Stream encountered HTTP error: 404

I asked ChatGPT but he tell me that's its a problem with Twitter sever

Upvotes: 0

Views: 663

Answers (1)

Mustafa Hayat
Mustafa Hayat

Reputation: 43

make sure you are using Twitter v2 endpoints for streaming. Twitter deprecated the v1.1 stream endpoint thats why you are getting this error.

Check the sample streaming code on GitHub here.

Upvotes: 0

Related Questions