Skip to content

Commit

Permalink
tumblr_backup: --likes: Support new API behavior
Browse files Browse the repository at this point in the history
The API has apparently changed since aggroskater's fork was written.
  • Loading branch information
cebtenzzre committed Sep 30, 2020
1 parent 79b3e60 commit 62e492a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tumblr_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,11 @@ def _backup(posts, post_respfiles):
break

if options.likes:
before = resp['_links']['next']['query_params']['before']
next_ = resp['_links'].get('next')
if next_ is None:
log.status('Backing up posts end of likes, finishing\r')
break
before = next_['query_params']['before']
i += MAX_POSTS
except:
# ensure proper thread pool termination
Expand Down

0 comments on commit 62e492a

Please sign in to comment.