WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

886

(post is archived)

[–] 0 pt

Oh and also if you are not convinced yet ;) that it really doesn't transfer the whole file:

# a download, normal GET request
curl -L https://pic8.co/sh/m2v8Y4.jpg -o "/dev/null"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100 33382  100 33382    0     0  13315      0  0:00:02  0:00:02 --:--:-- 25193
# HEAD request, received=0
curl -LI https://pic8.co/sh/m2v8Y4.jpg -o "/dev/null"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0 33382    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0

Some very stupid servers may not show content-length, and that's the ONLY time you'd want to download either the file header or the whole file.

[–] 1 pt

urllib3 does support redirections.

Pic8 has been a little slow recently due to a bug, and because it doesn't host images but only host links it redirects too, it's normal that it takes a little more time.

I'm checking a direct link to catbox.moe and it gives me the same answer.

I can get the right 'width & height', but the size is still stuck at 31 bytes (the range/size of the headers).

I'll check that later. Got something else to do now.

Thanks for the curl suggestion.