Skip to content

Instantly share code, notes, and snippets.

@michaelhelmick
Created May 28, 2013 18:08
Show Gist options
  • Save michaelhelmick/5664788 to your computer and use it in GitHub Desktop.
Save michaelhelmick/5664788 to your computer and use it in GitHub Desktop.
from twython import TwythonStreamer
class MyStreamer(TwythonStreamer):
def on_success(self, data):
if 'text' in data:
print (data['text'].encode('utf-8'))
def on_error(self, status_code, data):
print (status_code, data)
stream = MyStreamer(APP_KEY, APP_SECRET,
OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
stream.statuses.filter(track='@mikehelmick')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment