bbolli / tumblr-utils

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

Backup script still doesn't save highest resolution image #222

Open LizardList opened 3 years ago

LizardList commented 3 years ago

The problem with urls needing to be replaced with *_1280 at the end, seems to have been fixed in #80 However, there exists another kind of image url (probably newly implemented by tumblr).

An example from this post:

https://girilimoni.tumblr.com/post/618689233552637952/and-so-i-fulfilled-my-dream-of-making-comics

Here's the first image of the post: https://64.media.tumblr.com/3e10d6fa224ee770245e4fb965283860/3ed90c7f16a53a25-3e/s1280x1920/57d180028186c2bd6fd73733e1123828753f6525.jpg

tumblr_backup.py successfully downloads this image. However, if you change the url to some ridiculously high number, you can get a higher resolution image.

64.media.tumblr.com/3e10d6fa224ee770245e4fb965283860/3ed90c7f16a53a25-3e/s1280x1920/57d180028186c2bd6fd73733e1123828753f6525.jpg

64.media.tumblr.com/3e10d6fa224ee770245e4fb965283860/3ed90c7f16a53a25-3e/s999999999x999999999/57d180028186c2bd6fd73733e1123828753f6525.jpg

The s1280x1920 url downloads an image of 1280x784 in dimension. The s999999999x999999999 url downloads an image of 2874x1761 in dimension.

The number can be changed to whatever, but I've found that the higher it is, the better. It will only download in the highest available resolution if the dimensions of the url are >= to the image's highest available resolution.

Every other image in the command I used has the same url issue. I've seen this new url type on other blogs too. A fix would be appreciated!

bbolli commented 3 years ago

BTW, #80 was about saving inline images in text posts, so not related to photo posts.

LizardList commented 3 years ago

@bbolli Sadly it's still not working. It seems to download the images in better quality than before, but still not the best available.

Here's an example using the example from the post above: 57d180028186c2bd6fd73733e1123828753f6525 ^ Image from previous release (cf39892) lower resolution

f299efc710ba23879921b683806bbaadc18f426e ^ Image from this release (f8ae83d) higher resolution

e37ee7f25611f557c44b89a84b6ea946547d5afd8de23e7704314836635d24dd ^ Highest res image from the original tumblr post.