timhutton / twitter-archive-parser

Python code to parse a Twitter archive and output in various ways
GNU General Public License v3.0
2.42k stars 110 forks source link

How do I use it?

  1. Download your Twitter archive (Settings > Your account > Download an archive of your data).
  2. Unzip to a folder.
  3. Right-click this link --> parser.py <-- and select "Save Link as", and save into the folder where you extracted the archive. (Or use wget or curl on that link. Or clone the git repo.)
  4. Open a command prompt and change directory into the unzipped folder where you just saved parser.py.
    (Here's how to do that on Windows: Hold shift while right-clicking in the folder. Click on Open PowerShell.)
  5. Run parser.py with Python 3. e.g. python parser.py.
    (On Windows: When the command window opens, paste or enter python parser.py at the command prompt.)

If you are having problems please check the issues list to see if it has happened before, and open a new issue otherwise.

What does it do?

The Twitter archive gives you a bunch of data and an HTML file (Your archive.html). Open that file to take a look! It lets you view your tweets in a nice interface. It has some flaws but maybe that's all you need. If so then stop here, you don't need our script.

Flaws of the Twitter archive:

Our script does the following:

For advanced users:

Some of the functionality requires the requests and imagesize modules. parser.py will offer to install these for you using pip. To avoid that you can install them before running the script.

Articles about handling your Twitter archive:

Related tools:

If our script doesn't do what you want then maybe a different tool will help: