Copyright © 2009, Brendan Doms
Licensed under the MIT license
NB: This is a fork with more limited functionality than the trunk! You may not find it useful, it's tweaked for my use and comprehension. Support for tags and CSV output are removed, for example.
Tumblr Backup is a tool for making an HTML backup of your Tumblr posts.
There is one dependency: version 4 of Beautiful Soup.
If you already have it installed globally then you can grab the single .py
file and it should work.
Otherwise, install via pip:
pip install -r requirements.txt
If you have Python 3 installed make sure you use 2!
By default, a new folder with post data saved in individual HTML files will be created, and resources like images will be saved in another subfolder of the parent:
script folder
|_ 'output' folder
|_ posts put into folders by year
|_ images folder
To backup your account, just include the URL of your Tumblr website:
python2 tumblr_backup.py example.tumblr.com
If you use a custom domain, then that will also work:
python2 tumblr_backup.py www.example.com
You can also specify a different directory to save to with the command line option save_folder
:
python tumblr_backup.py --save_folder=/path/to/folder example.tumblr.com
Specify the post number to start from (useful with bad internet connection to continue from the last posts group):
python tumblr_backup.py --start_post=N example.tumblr.com
Tumblr has a lot of different types of posts. The ones currently supported by Tumblr Backup are:
- Regular
- Photo (single photos only)
- Quote
- Link
The default encoding is UTF-8. If you wish to change this, you can simply modify or override the
global ENCODING
variable.
- Add support for video posts.
- Add proper support for multi-image posts (at the moment I think it only grabs the first image).
- Update to Phython 3 syntax?
- I may actually have more requirements than just Beautiful Soup--check.