cesy / backup_tumblr

Scripts for backing up your posts, likes and media files from Tumblr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

backup_tumblr

This is a set of scripts for downloading your posts and likes from Tumblr.

The scripts try to download as much as possible, including:

  • Every post and like
  • All the metadata about a post that's available through the Tumblr API
  • Any media files attached to a post (e.g. photos, videos)

I've had these for private use for a while, and in the wake of Tumblr going on a deletion spree, I'm trying to make them usable by other people.

Pictured: a group of Tumblr users fleeing the new content moderation policies. Image credit: Wellcome Collection, CC BY.

Getting started

  1. Install Python 3.6 or later. Instructions on the Python website.

  2. Check you have pip installed by running the following command at a command prompt:

    $ pip3 --version
    pip 18.1 (python 3.6)

    If you don't have it installed or the command errors, follow the pip installation instructions

  3. Clone this repository:

    $ git clone git@github.com:alexwlchan/backup_tumblr.git
    $ cd backup_tumblr
  4. Get yourself a Tumblr API key by registering an app at https://www.tumblr.com/oauth/apps.

Usage

There are three scripts in this repo:

  1. save_posts_metadata.py saves metadata about all the posts on your blog.
  2. save_likes_metadata.py saves metadata about all the posts you've liked.
  3. save_media_files.py saves all the media (images, videos, etc.) from those posts.

They're split into separate scripts because saving metadata is much faster than media files.

You should run (1) and/or (2), then run (3). Something like:

$ python3 save_posts_metadata.py

$ python3 save_likes_metadata.py

$ python3 save_media_files.py

If you know what command-line flags are: you can pass arguments (e.g. API key) as flags. Use --help to see the available flags.

If that sentence meant nothing: don't worry, the scripts will ask you for any information they need.

Unanswered questions and notes

  • I have no idea how Tumblr's content blocks interact with the API, or if blocked posts are visible through the API.

  • I've seen mixed reports saying that ordering in the dashboard has been broken for the last few days. Again, no idea how this interacts with the API.

  • Media files can get big. I have ~12k likes which are taking ~9GB of disk space. The scripts will merrily fill up your disk, so make sure you have plenty of space before you start!

  • These scripts are provided "as is". File an issue if you have a problem, but I don't have much time for maintenance right now.

Licence

MIT.

About

Scripts for backing up your posts, likes and media files from Tumblr

License:MIT License


Languages

Language:Python 100.0%