Updating Twitter Streaming API in real time


#1

I’m using the tweepy module to access Twitter’s streaming API. What I’ve done previuosly is to define a set of keywords and insert them into a list terms[]:

streamer.filter(track = terms)

Would it be possible to update the list with new keywords WHILST the streamer.filter(track = terms) is running and so track is searching for keywords dynamically as opposed to an static list.

Thanks


#2

Ranjeev, did you get any further with this?


#3

You must reconnect to change the terms you are tracking with the Streaming API – there’s now way around it.


#4

Even i want to know if we can use the ‘filter’ or ‘track’ in streaming api to search for keywords that we give dynamically. Pls do reply


#5

You would have to reconnect each time – there’s no way to dynamically change the keywords of an already open connection.


#6

I’m trying this as well. So I stop the stream, update the tracks and start it again.
But it works only for 2 times.
The 3rd time the stream does not get initialized.
I have to stop the application and start it again.
Is this a limitation of twitter?