BigSnarf blog

Infosec FTW

Python, Twitter, and “I hate my parents” – Christmas Meme?

Twitter Stream

Screen Shot 2013-12-25 at 10.15.18 AM


Screen Shot 2013-12-25 at 10.19.06 AM


Screen Shot 2013-12-25 at 10.18.47 AM

Screen Shot 2013-12-25 at 10.24.24 AM





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,
# Tracking Twitter search term

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: