Open thatfuckingbird opened 6 months ago
Your examples work fine for me too. I've found a public post that produces the error: https://www.patreon.com/posts/2024-reward-96147929
No error for me ...
edit: https://github.com/yt-dlp/yt-dlp/issues/8973 might be related
the yt-dlp error only presents if the user is passing cookies/auth
Tried the public post above without cookies. It works fine. If I pass cookies the error returns.
Using --write-pages
and diffing the 01_https_www.patreon.com_posts_2024-reward-96147929.txt
files, the post_file data looks completely different if logged in vs. not (left is the logged in version).
I can reproduce but it is on a private post and breaks the progress.
Here is a gist with verbose output: https://gist.github.com/shinji257/e17f41f53a8f68e07871260ac5cb656e
I went back and tried the 3 most recent posts from this author and all do the same thing so this looks like an issue only when authenticated.
Should be fixed with https://github.com/mikf/gallery-dl/commit/1c68b7df010913cb661f06224bbbf7b610c79590
Not sure how this is going to affect filename
metadata for postfile
files.
I also still can't reproduce this error, even with logged in cookies. Maybe because I'm not subscribed to that creator or really anyone.
I did notice that if you are on a free sub it doesn't reproduce. It only affects paid subs. Probably why you can't reproduce.
I tested the new build and it seems to be fine with filenames as far as I can tell. Example output:
shinj@Tinym P:\....\gallery-dl .\gallery-dl.exe --cookies-from-browser brave/patreon.com https://www.patreon.com/ssh_in_ys
[cookies][info] Extracted 9 cookies from Brave
# .\gallery-dl\patreon\sh_in_ys\93511207_Patch's attraction_P1, P2_01.png
# .\gallery-dl\patreon\sh_in_ys\93511207_Patch's attraction_P1, P2_02.png
# .\gallery-dl\patreon\sh_in_ys\95165587_Happy New Year 2024!_01.png
# .\gallery-dl\patreon\sh_in_ys\94523345_TTR 2023 December Rewards_01.png
# .\gallery-dl\patreon\sh_in_ys\94523345_TTR 2023 December Rewards_02.png
# .\gallery-dl\patreon\sh_in_ys\94523345_TTR 2023 December Rewards_03.png
* .\gallery-dl\patreon\sh_in_ys\89867129_Zipping up_01.png
* .\gallery-dl\patreon\sh_in_ys\89867129_Zipping up_02.png
* .\gallery-dl\patreon\sh_in_ys\90649576_Vapereon Suit_02_01.png
* .\gallery-dl\patreon\sh_in_ys\90649576_Vapereon Suit_02_02.png
[patreon][warning] Not allowed to view post 94006700
* .\gallery-dl\patreon\sh_in_ys\90649516_Vapereon suit_01_01.png
* .\gallery-dl\patreon\sh_in_ys\90649516_Vapereon suit_01_02.png
* .\gallery-dl\patreon\sh_in_ys\92996750_TTR 2023 November Rewards_01.png
[patreon][warning] Not allowed to view post 89455610
* .\gallery-dl\patreon\sh_in_ys\89404181_PomPom form_01.png
* .\gallery-dl\patreon\sh_in_ys\89404181_PomPom form_02.png
* .\gallery-dl\patreon\sh_in_ys\89404181_PomPom form_03.png
* .\gallery-dl\patreon\sh_in_ys\89404181_PomPom form_04.png
* .\gallery-dl\patreon\sh_in_ys\90191884_Null face drone, Noivern spawning_01.png
* .\gallery-dl\patreon\sh_in_ys\90191884_Null face drone, Noivern spawning_02.png
Should be fixed with 1c68b7d Not sure how this is going to affect
filename
metadata forpostfile
files.I also still can't reproduce this error, even with logged in cookies. Maybe because I'm not subscribed to that creator or really anyone.
I noticed there is another structure inside the bootstrap json that contains the file metadata which seems to be the same between free and paid tiers (i.e. if you use --write-pages
to get the free post I linked without any cookies, and search that filename starting with S__
it will occur in one more place) - however that structure looks more complicated to me so might not be easy to switch to it.
Going to try the current fix in the meantime.
Edit: seems to be working fine. Even the filename
metadata field is OK so I guess it gets it from somewhere else (?).
There seem to be cases where the metadata in this other structure does not include the post_file
when it is a video, but only its preview image.
In the yt-dlp example, the https://stream.mux.com
URL and its useless video
filename are only available as post_file
. The only "type": "media"
data in included
is just its thumbnail with vlcsnap-2023-12-15-14h25m32s661.png
as name.
What I'm saying is that it's sadly not as easy to use as simply using the metadata from the "type": "media"
file instead of from post_file
.
Edit: seems to be working fine. Even the
filename
metadata field is OK so I guess it gets it from somewhere else (?).
It does an extra HEAD request in self._filename(url)
and uses the Content-Disposition
value.
Getting the following error on Patreon post URLs now (post URL partially redacted but it seems to occur on all posts I tried anyway):
Interestingly the files are still downloaded despite the error.