made a collection of twitter api solutions
[twitter-api-cdsw-solutions] / twitter-stream2.py
diff --git a/twitter-stream2.py b/twitter-stream2.py
deleted file mode 100644 (file)
index 47855d8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-import encoding_fix
-import tweepy
-from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
-
-auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
-auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
-
-api = tweepy.API(auth)
-
-class StreamListener(tweepy.StreamListener):
-    def on_status(self, tweet):
-        print(tweet.author.screen_name + "\t" + tweet.text)
-
-    def on_error(self, status_code):
-        print( 'Error: ' + repr(status_code))
-        return False
-
-l = StreamListener()
-streamer = tweepy.Stream(auth=auth, listener=l)
-
-keywords = ['python', 'perl']
-streamer.filter(track = keywords)

Benjamin Mako Hill || Want to submit a patch?