bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
668 stars 124 forks source link

Tumblr backup updated for Python 3 #96

Open heatherbmayer opened 7 years ago

heatherbmayer commented 7 years ago

Use this version for Python 3. It was converted first by hand and then I also ran 2to3 on it just to be safe. It has been tested for both full and incremental backup which was successful.

bbolli commented 6 years ago

Thanks!

Is it possible to have a single script that works with both Python 2 and Python 3? Otherwise, the installation and setup gets too complicated for the average user.

GiovanH commented 5 years ago

Python2 is depreciated, and so the average user should only be using Python3 anyway.

thatcatlooksstrong commented 5 years ago

I have a problem running this version (I am using 3.5 with the Mac OS X command line)

python tumblr_backup_python3.py -O /Volumes/G-DRIVE\ ev/Tumblr blogname Traceback (most recent call last):on
File "tumblr_backup_python3.py", line 1087, in tb.backup(account) File "tumblr_backup_python3.py", line 473, in backup soup = apiparse(base, 1) File "tumblr_backup_python3.py", line 216, in apiparse doc = json.loads(data) File "//anaconda/lib/python3.5/json/init.py", line 312, in loads s.class.name)) TypeError: the JSON object must be str, not 'bytes'

bbolli commented 5 years ago

Python2 is depreciated, and so the average user should only be using Python3 anyway.

That's premature. macOS High Sierra only comes with Python 2, e.g.

cebtenzzre commented 4 years ago

@bbolli My local fork of tumblr-utils (with features from a lot of my PRs) is fully compatible with both Python 2 and Python 3 in a single script. So, it's possible, it just requires a little more care.

joesmork commented 4 years ago

You might want to remove that API key