From e3e1d062377a5833b16e8ac8976a56ac57fac8a2 Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 12 Apr 2021 14:44:11 -0500 Subject: [PATCH] Remove streaming.py example --- examples/streaming.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 examples/streaming.py diff --git a/examples/streaming.py b/examples/streaming.py deleted file mode 100644 index a9a3c11..0000000 --- a/examples/streaming.py +++ /dev/null @@ -1,31 +0,0 @@ -from tweepy import OAuthHandler, Stream, StreamListener - -# Go to http://apps.twitter.com and create an app. -# The consumer key and secret will be generated for you after -consumer_key="" -consumer_secret="" - -# After the step above, you will be redirected to your app's page. -# Create an access token under the the "Your access token" section -access_token="" -access_token_secret="" - -class StdOutListener(StreamListener): - """ A listener handles tweets that are received from the stream. - This is a basic listener that just prints received tweets to stdout. - - """ - def on_data(self, data): - print(data) - return True - - def on_error(self, status): - print(status) - -if __name__ == '__main__': - l = StdOutListener() - auth = OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(access_token, access_token_secret) - - stream = Stream(auth, l) - stream.filter(track=['basketball']) -- 2.25.1