patrickkfkan / patreon-dl

Patreon Downloader
53 stars 3 forks source link

Images without a file type. #20

Closed Ninccino closed 2 months ago

Ninccino commented 2 months ago

Occasionally an image would encounter a value of null when checking the id and be given its id or an assortment of like 50-60 characters as the file name. Issue is, the file wouldn’t have any extension connected. No jpg, webp, png, etc. Just a file name. I don’t believe it was considered an error in logs.

It consistently happened when trying to download an image from a Patreon post that had a video link attached to it and images “embedded” into the post. They weren’t attachments or files.

I don’t have it set to download videos. ffmpeg is installed but not being used. At first I had issues with emojis but I checked issues and switched my node js version to 22 and it fixed them. When I encountered this I tried switching over to 18 LTS. I’m not sure if the issue occurred when I was on 20 LTS. I can check if you’d like.

I didn’t have logging enabled outside of cmd.

patrickkfkan commented 2 months ago

Could you provide a link to a post where this happens?

Ninccino commented 2 months ago

Like this?

https://www.patreon.com/posts/103145201?utm_campaign=postshare_fan

patrickkfkan commented 2 months ago

The link helps. I've fixed this in v1.6.1. Could you please test if the fix works for you? Thanks.

Ninccino commented 2 months ago

1.6.1 returns "Data error (campaign ID not found)" whenever I add a url.

CMD = error: Campaign ID not found in initial data of "https://www.patreon.com/guweiz"

I tried using the example config to see if it would work and it still doesn't.

patrickkfkan commented 2 months ago

Coincidentally, Patreon made some breaking changes on their end.

Anyway, I just fixed this in v1.6.2.

Ninccino commented 2 months ago

Well, that explains it. It works fine now, thank you.