Skip to content
Getting json files from tweets.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Mine twitter

This is part of a larger project with the objective of automatically displaying Twitter data in Adobe After Effects CC from a JSON file. My friend Arturo Bracero posted a complete tutorial about this topic on his personal blog.

In this repository, the python script contains the necessary code to extract a JSON file from a tweet ID (the digits at the end of a tweet URL).

Using the script

First of all, you need to obtain your Twitter API credentials from, if you still haven't done it.

Once you have it, simply substitute your own credentials on the four lines following the comment Twitter API credentials.

Then, you just call the program as python TWEET_ID, where TWEET_ID should be the numeric ID of the wanted tweet. For example, to get the JSON file from this tweet, run:

python 932728419640492032

Optional arguments

When calling the script, apart from the JSON file, the profile picture of the user that posted the tweet will also be saved. The image will be saved to 400x400 pixels by default. Adding an additional argument after the tweet ID while calling the script modifies the size of the saved image. For example, running the following code saves the image to 1000x1000 pixels:

python 932728419640492032 1000
You can’t perform that action at this time.