My current very simple code is supposed to use the twitter streaming API for simply printing all tweets under a certain keyword into console. However I can't figure out how to get the full text of the tweet instead of the truncated version. The program also elsewhere utilizes
new_tweets = api.user_timeline(screen_name=username, count=200, tweet_mode='extended')
in which the last parameter specifies exactly that.
This is my current code:
class LiveTweetListener(tweepy.StreamListener):
def on_status(self, status):
try:
print(status.full_text)
except AttributeError:
print(status.text)
def on_error(self, status_code):
if status_code == 420:
print("420")
return False
def start_stream(track):
Listener = LiveTweetListener()
stream = tweepy.Stream(auth=api.auth, listener=LiveTweetListener())
stream.filter(track=track, async=True)
Passing tweet_mode='extended' with stream = tweepy.Stream doesn't seem to work