Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive images load from tumblr instead of using /media locally #236

Open
BCD413 opened this issue Apr 28, 2023 · 5 comments
Open

Archive images load from tumblr instead of using /media locally #236

BCD413 opened this issue Apr 28, 2023 · 5 comments
Labels

Comments

@BCD413
Copy link

BCD413 commented Apr 28, 2023

I was running a standard full backup using [892e28d] with the standard python tumblr_backup.py [blog name] command. Then when i loaded up the archive, i noticed that it loads slower [as in, line-by-line], as if it's loading from somewhere other than my local drive.

When i checked where the image was loading from, i noticed that it was loading directly from tumblr with the 64.media.tumblr.com link, rather than using the locally-stored files as it did in my past backups using older versions [July 2021].

Mind looking into this?

@cebtenzzre
Copy link
Collaborator

This is only supposed to happen for images that couldn't be downloaded unless you use -k. Did you see any errors while you were making the backup? If you back up the same posts using my fork (you can use e.g. -n 100 to back up just a few) do you see the same issue, or any different errors?

@cebtenzzre cebtenzzre added the waiting for reply Blocked until further information label Jul 18, 2023
@cebtenzzre cebtenzzre closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
@veloskies
Copy link

veloskies commented Nov 13, 2023

I have essentially zero coding experience so please be VERY explicit with instructions.

Just downloaded all the relevant scripts etc last night and while experimenting this morning found that inline images are being loaded from their 64.media.tumblr link rather than the /media file. Double checked to make sure they were downloaded and they are present in the /media file, they just don't load from there. Non-inline images load locally.

Not sure if this error is relevant:
'warning: filetype module not found, using deprecated imghdr'

I did try using your specific fork as instructed and got the same results.

EDIT: Further experimentation shows that when the post is opened via its specific post link in /posts it loads the images locally, but when it's opened from the index or the archive it loads them from 64.media.tumblr.

@cebtenzzre cebtenzzre reopened this Nov 14, 2023
@cebtenzzre
Copy link
Collaborator

I haven't observed this in my backups. What does the HTML look like for the one that loads via 64.media.tumblr.com vs one that doesn't? If it's just a regular img src= and you are making a fresh backup with my fork then I don't see how there could be a difference.

@veloskies
Copy link

veloskies commented Dec 16, 2023

The backup is completely fresh, I've never done this before. I have had a look and the html is different.

This loads from backup:

media1

This does not, and was all on one line along along with six more formatted the same way:

media2

Both came from the same backup, but if it helps, the first one was from a post in 2015, and the latter from a post last month.

If you need more specific info please let me know!

@cebtenzzre
Copy link
Collaborator

This does not, and was all on one line along along with six more formatted the same way:

Thanks for that information. I've seen that in HTML before but didn't realize the browser was ignoring the src attribute and using srcset instead - but it makes sense that it would do that. tumblr_backup.py isn't currently aware of the srcset attribute AFAIK.

@cebtenzzre cebtenzzre added bug and removed waiting for reply Blocked until further information labels Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants