For a while, Twitter has offered an archive service. This is useful for keeping a backup of your tweets, but that’s exactly where it begins and ends. In fact it doesn’t even save photos in tweets so you are left with a very barebones archive. For a while I had wished for a better solution, something that could save every aspect about my Twitter account. I would like to be able to see who all my followers were, as well as who I was following at a point in time. I searched around online but couldn’t find a good solution to this. This weekend, I decided to build my own.
I have never spent much time working with Python, though it has been on my to-do list for quite some time. Yesterday however, I was able to learn a whole lot. That is partially evidenced by the fact that the scripts I wrote somehow actually work. I have uploaded them to Github here. These Python scripts use the Twitter API to get followers and friends lists for whatever account you specify. Then, they convert the result into an easy-to-use CSV file.
These programs require some setup before running. You will need to install the Twython library and UnicodeCSV module, and you will also need to get a Twitter API key by creating a Twitter application.
I hope the scripts that I’ve written can help you get a better archive of your Twitter account. However, a Twitter archive along with these following/followers lists is still not comprehensive. It would be nice for example to have a script that downloads images from tweets in the archive and then edits the archive to point to the now locally-saved photos. That is something I might work on in the future.