403 Client Error: Forbidden for all posts from pawchive.pw
Guidelines
- [x] I have read the Contributing Guidelines and agree to follow them.
Description
For each post download from pawchive, the same error arises during download, saying Download failed for [file], attempt x/50: 403 Client Error: Forbidden for url: [url]
Steps to Reproduce
- Enter post URL
- Click preview
- Click download
- Error messages repeat
Expected Behavior
Successful download
Actual Behavior
Error messages
Operating System
Windows
Python Version
3.13
KemonoDownloader Version
v5.12.0
Screenshots or Logs
This is a rate limit from server side. https://t.me/pawchivest/17
I tried to set the number of concurrent downloads to 1, and even though I haven't downloaded any files in the last 24 hours, I'm still getting the same error. According to the announcement on paw's channel, it seems we need to set a specific user agent to not pretend to be a browser?
In https://t.me/pawchivest/17 :
It's fine to use downloader tools, but please set your user-agent header to something identifiable (preferably with a contact). Please do not pretend to be a browser.
Looking at the source code, the downloader is indeed masquerading as a browser by only UA, which technically can easily be identified through traffic characteristics...
https://github.com/VoxDroid/KemonoDownloader/blob/463cf8041e20a77a2b2fee68039c335633dffd68/src/kemonodownloader/creator_downloader.py#L89-L102
I'm pretty sure the problem is with the fake user agent, because I forked/cloned this app's repo, added a custom user agent control, used a non-browser user agent like "Downloader/App", and set the number of concurrent downloads to 1—and then it downloaded normally.
I won't say just changing user-agent would be enough, following what the maintainers ask for is more important.
They could have applied more strict rules such as IP banning when the service was abused which, as you say, can easily be identified through traffic characteristics.
Yeah, nor would I say that simply changing the User-Agent is sufficient. Every server has capacity limits; rate limits and IP bans are common and should be implemented as a matter of course. It is up to users of download tools to adopt a mindset of reasonable use and to take responsibility for their own usage. The official channel mentions: “Be reasonable and avoid making more than 1 request to files per second / having more than 5 active downloads” . When it comes to service abuse, I feel this is a condemnation of those who use a huge number of concurrent connections and download non-stop.
(My local broadband contract speed is already 512 kbps, which takes roughly 10 to 15 seconds per image, and I’ve configured the number of simultaneous downloads to 1 yesterday meaning no concurrent downloads; I only download about twenty images from a few posts each day, just as I used to do by right-clicking and selecting ‘Save As’ while browsing. Even if I were to switch to a faster broadband connection in the coming years, I would likely maintain a similar pace of access, which I consider reasonable.)
This downloader is a very handy piece of software that has helped me a lot. It’s a great pity that a small group of people are abusing similar tools without regard for other users, and they have failed to show respect for the operators of websites that run free of charge, despite facing enormous copyright risks. That’s truly disheartening.
Thanks, everyone, for digging into this, especially for the pointer to Pawchive's announcement and for testing with a non-browser user agent. That was the cause.
I verified it directly: Pawchive's file server (file.pawchive.pw) answers 403 to a browser user agent and serves the same file normally to a non-browser one.
- Downloads have been fixed since v5.13.0. Following Pawchive's guidance, the app identifies itself with a contactable user agent, starts at most one new file request per second, and keeps at most five Pawchive downloads active across its downloaders.
- Previews (step 2 in the report) still sent the browser user agent, so previewing a Pawchive file could still fail with 403. That's fixed in #92, which also applies the same policy to any future
pawchive.<suffix>domain.
This issue closes automatically when #92 is merged, and the fix ships in the next release. If you still get 403 errors while downloading on v5.14.0 or later, please open a new issue with the console log.