mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.37k stars 929 forks source link

[Patreon] Problem with Cloudflare #6140

Open NimbusCloudVoid opened 1 week ago

NimbusCloudVoid commented 1 week ago

I have a problem with Patreon for a while now, the Cloudflare problem and i can't download anything.. I looked at other issues for solution like TLS, Ciphers, browser and header and none of them works. I use cookies and the cf clearence is in the cookies txt, i'm on the latest version of gallery-dl and there is nothing that works. I'm on VPN and tried multiple servers and none of them works and for some reason when i tried another program to download patreon stuff with cookies it works.

here is my usual config:

        "patreon": {
            "cookies": {
                "session_id": "****",
                "path": "C:\\Users\\* * * *\\gallery-dl\\Cookies\\cookies-patreon-com.txt",
                "user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:129.0) Gecko/20100101 Firefox/129.0"

2024-09-05  WindowsTerminal_DzFWcR6iPB_01132

Hrxn commented 1 week ago

[..] I'm on VPN and tried multiple servers [..]

This might be the reason. IP ranges known for VPN usages or similar (VPS, whatever) are blocked entirely.

NimbusCloudVoid commented 1 week ago

Even after disabling the VPN it still doesn't works, i've even tried this program https://github.com/AlexCSDev/PatreonDownloader and while its scuffed i've managed to download the stuff i wanted, that's why its weird

mikf commented 1 week ago

This is not how cookies are supposed to be specified. Try these settings:

    "patreon": {
        "cookies": "C:\\Users\\* * * *\\gallery-dl\\Cookies\\cookies-patreon-com.txt",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:129.0) Gecko/20100101 Firefox/129.0",
        "browser": false
    }
NimbusCloudVoid commented 1 week ago

So, i've put your changes and i still get the cloudflare problem, i've also use the verbose option here:

        "patreon": 
        {
            "cookies": "C:\\Users\\****\\gallery-dl\\Cookies\\cookies-patreon-com.txt",
            "user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:129.0) Gecko/20100101 Firefox/129.0",
            "browser": false
        },

C:\Users\ REDACTED>gallery-dl https://www.patreon.com/ REDACTED/posts --verbose [gallery-dl][debug] Version 1.27.4 [gallery-dl][debug] Python 3.11.7 - Windows-10-10.0.19045-SP0 [gallery-dl][debug] requests 2.32.3 - urllib3 2.2.2 [gallery-dl][debug] Configuration Files ['%APPDATA%\gallery-dl\config.json'] [gallery-dl][debug] Starting DownloadJob for 'https://www.patreon.com/ REDACTED/posts' [patreon][debug] Using PatreonCreatorExtractor for 'https://www.patreon.com/ REDACTED/posts' [patreon][debug] TLS 1.2 disabled. [patreon][debug] Loading cookies from 'C:\Users\ REDACTED\gallery-dl\Cookies\cookies-patreon-com.txt' [urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.patreon.com:443 [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /****/posts HTTP/11" 403 None [patreon][warning] Cloudflare challenge [patreon][error] HttpError: '403 Forbidden' for 'https://www.patreon.com/ REDACTED/posts'