Skip to content

Instantly share code, notes, and snippets.

@icaromh
Last active September 18, 2017 20:15
Show Gist options
  • Save icaromh/a6c0fd3f2b164ddc606879ea09e82a65 to your computer and use it in GitHub Desktop.
Save icaromh/a6c0fd3f2b164ddc606879ea09e82a65 to your computer and use it in GitHub Desktop.
import TwitterCredentials as c
from twython import TwythonStreamer
class MyStreamer(TwythonStreamer):
def on_success(self, data):
if 'text' in data:
print data['text'].encode('utf-8')
stream = MyStreamer(c.APP_KEY, c.APP_SECRET, c.OAUTH_TOKEN, c.OAUTH_TOKEN_SECRET)
stream.statuses.filter({ follow: ['icaromh', 'KingHost', 'G1'] })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment