X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw-solutions/blobdiff_plain/30dd074a58c070a2ac07650a5eef9c13c3e773a9..b5d973d7a0a14eca21b2981ffacf4fb9ea77ba41:/twitter-stream2.py diff --git a/twitter-stream2.py b/twitter-stream2.py index ce905ea..8e1eee1 100644 --- a/twitter-stream2.py +++ b/twitter-stream2.py @@ -8,10 +8,10 @@ api = tweepy.API(auth) class StreamListener(tweepy.StreamListener): def on_status(self, tweet): - print tweet.user.screen_name + "\t" + tweet.text + print(tweet.author.screen_name + "\t" + tweet.text) def on_error(self, status_code): - print 'Error: ' + repr(status_code) + print( 'Error: ' + repr(status_code)) return False l = StreamListener()