I have been listening to the Twitter public stream with Twython with no problem but the production server stopped receiving any tweets for a couple of days.
I've created a simple test case:
>>> from twython import TwythonStreamer
>>>
>>> class TestStreamer(TwythonStreamer):
... def on_success(self, data):
... print data
...
>>> stream = TestStreamer(KEY, SECRET, TOKEN, TOKEN_SECRET)
>>>
>>> stream.statuses.filter(track='clinton,trump')
This snippet runs on the development server. Tweets instantly start flowing in. On production it again seems to be listening, there are no errors thrown, but no tweets.
I thought it might be the firewall on the server, or the server might be blacklisted on Twitter's side. But when I try the same query with curl command generated by the Twitter signature generator dev tool, with the same token set, the command starts receiving tweets instantly both on the development and production servers without any problem. I think this curl test eliminates these firewall, blacklist or token issues options.
What do you think the problem might be? Any help is greatly appreciated. Thanks.