bbolli / tumblr-utils

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

Do not trust the API's 'posts' and 'liked_count' fields #209

Closed tu-p closed 4 years ago

tu-p commented 4 years ago

These fields are incorrect in cases such as private posts changed to public, and this leads to missed posts when backing up blogs.

For example, create a blog with one private post and one public one, then publish the private post. tumblr_backup.py will only download 1 post without this patch.

This change also skips only a single post rather than an entire batch upon parse failures, in a further attempt to avoid dropping posts unnecessarily.

tu-p commented 4 years ago

Commit text line-wrapped.

tu-p commented 4 years ago

I've rewritten the logic as suggested.