Grab and easily save up to 100 tweets from a Twitter account!
With TweetGrabber, you simply provide the username (aka the @) for the Twitter account for whom you want to fetch/save Tweets from, and the name of the text or CSV file that the Tweets should be saved to. It's that easy!
Usage
Install repo via terminal as shown below, or just download.
git clone https://github.com/libgit2/libgit2
Then, create an app in the Twitter Developer Portal, and add the bearer token in 'auth_info.py.' That's it for the setup! Now, run get_tweets.py, and when prompted, input the Twitter account username and the file destination. You can enter multiple usernames, each separated by a comma and no whitespace. Also, if you don't care about the filenames, you can leave that input prompt blank, and the filenames will be automatically generated.
python3 get_tweets.py
The file 'trumptweets.txt' is an example file which was generated by fetching Tweets from 'realDonaldTrump.' The file is generated using Pandas, and can be easily read in as a DataFrame.
Notes
- You must have a Twitter Developer Account, and modify 'auth_info.py' with the bearer token. I'm looking to add the ability to fetch Tweets without having to create a developer account, but for now, one is needed.
- Only required packages are Pandas and Requests
- Contact me at zarif[dot]azher[at]gmail[dot]com with any questions, or just open an issue right here