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

[Patreon] Cloudflare Challenge - 403 Forbidden error #6241

Open
MarqFJA87 opened this issue Sep 27, 2024 · 5 comments
Open

[Patreon] Cloudflare Challenge - 403 Forbidden error #6241

MarqFJA87 opened this issue Sep 27, 2024 · 5 comments

Comments

@MarqFJA87
Copy link

MarqFJA87 commented Sep 27, 2024

Today Patreon seems impossible to download from with gallery-dl, with every attempt returning a 403 error citing a Cloudflare challenge. Here's the debug log.

D:\Programs\Bulk downloaders\gallery-dl>gallery-dl https://www.patreon.com/posts/casual-artoria-112831101 --verbose
[gallery-dl][debug] Version 1.27.4
[gallery-dl][debug] Python 3.10.0 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.32.2 - urllib3 2.2.1
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.patreon.com/posts/casual-artoria-112831101'
[patreon][debug] Using PatreonPostExtractor for 'https://www.patreon.com/posts/casual-artoria-112831101'
[patreon][debug] TLS 1.2 disabled.
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.patreon.com:443
[urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /posts/casual-artoria-112831101 HTTP/1.1" 403 None
[patreon][warning] Cloudflare challenge
[patreon][error] HttpError: '403 Forbidden' for 'https://www.patreon.com/posts/casual-artoria-112831101'
@conkerts
Copy link

I'm having the issue as well.
because of the [gallery-dl][debug] requests 2.32.2 - urllib3 2.2.1
I thought it might be the requests thing like last time, but seems not. #5624 (comment)

I tried 3 different versions that I got, and all similar issues.
Once with the current release.
Then with my old one:

[gallery-dl][debug] Version 1.26.9 - Executable
[gallery-dl][debug] Python 3.8.10 - Windows-10-10.0.19045
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob 
....
[patreon][warning] Cloudflare challenge
[patreon][error] HttpError: '403 Forbidden'  ...

Same for the nightly from yesterday, tho my requests version is different

[gallery-dl][debug] Version 1.27.5-dev:2024.09.27 - Executable (dev/windows)
[gallery-dl][debug] Python 3.12.6 - Windows-10-10.0.19045-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.2.3

@BoostHellSix66
Copy link

I opened and then closed an issue thinking the problem was on me ( #6239 ), but the issue has occurred several times after.

From what I've noticed, If I try to download and get a Cloudflare challenge and then wait ~12 hrs, reattempt the download, it works. I don't know why this works, but It's worked several times now.

@MarqFJA87
Copy link
Author

Well that solution hasn't worked for me, so it's a mystery why it's working for you. What's going on here?

@mikf
Copy link
Owner

mikf commented Sep 29, 2024

What's going on here?

Not everyone lives in the same place on this world. Cloudflare treats requests from different IP ranges differently.

Anyway, you could try changing/disabling the default "browser": "firefox" and/or "tls12": false settings. Using custom headers and ciphers could also help. Basically anything that changes the request "fingerprints".

@BoostHellSix66
Copy link

Thank you for the info on this issue.

Admittedly, I am not familiar with how Cloudflare functions at all, or how it uses digital fingerprints to authenticate. How would I go about, or start, trying to enable TLS1.2 or change my fingerprint through custom headers or ciphers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants