Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions get_tweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def get_tweets(username):

#get tweets
tweets_for_csv = []
for tweet in tweepy.Cursor(api.user_timeline, screen_name = username).items(number_of_tweets):
for tweet in tweepy.Cursor(api.user_timeline, screen_name = username, tweet_mode = extended).items(number_of_tweets):
#create array of tweet information: username, tweet id, date/time, text
tweets_for_csv.append([username, tweet.id_str, tweet.created_at, tweet.text.encode("utf-8")])
tweets_for_csv.append([username, tweet.id_str, tweet.created_at, tweet.full_text.encode("utf-8")])

#write to a new csv file from the array of tweets
outfile = username + "_tweets.csv"
Expand Down