0

I'm trying to download tweets using tweepy. But the tweets keep getting cut off.

results = api.search(q=hashtag, lang="en", count=num, tweet_mode="extended")
for tweet in results:
    tweet_list.append(tweet.full_text)

I end up getting outputs looking like this:

RT @Acosta: Trump also said at the meeting “why do we need more Haitians? Take them out,” a person familiar with today’s meeting confirms t…

I just want the actual full text part of the tweet.

Tmgiewont
  • 5
  • 5

1 Answers1

2

Already answered here

Instead of full_text=True you need tweet_mode="extended"

Then, instead of text you should use full_text to get the full tweet text.

Your code should look like:

new_tweets = api.user_timeline(screen_name = screen_name,count=200, tweet_mode="extended") Then in order to get the full tweets text:

tweets = [[tweet.full_text] for tweet in new_tweets]

Community
  • 1
  • 1
specbug
  • 512
  • 5
  • 16