X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw/blobdiff_plain/30dd074a58c070a2ac07650a5eef9c13c3e773a9..043b63c67557591f1e85b53d17fc8a1a797f48ca:/twitter-stream1.py diff --git a/twitter-stream1.py b/twitter-stream1.py index 06f7be0..87c548c 100644 --- a/twitter-stream1.py +++ b/twitter-stream1.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()