mikf / gallery-dl

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

Kemono.Party DDoS cookies issue #1716

Closed ZyyDesu closed 3 years ago

ZyyDesu commented 3 years ago

I'm having an issue with kemono.party, where it's telling me that I haven't set the DDoS Guard cookies. I've tried adding them manually to the default config linked on the git page, but I'm assuming I did it incorrectly:

"kemonoparty":
{
    "cookies":
        {
        "__ddg1": "DDG1 HERE"
        "__ddg2": "DDG2 HERE"
        "session": "SESSIONCOOKIE HERE"
        }
},

I also tried adding them via the cmd, with an exported file from Firefox, with the linked plugin on the git page, and it tells me:

C:\Users\Zyy>gallery-dl --cookies "C:/Users/Zyy/gallery-dl/cookies-kemono-party.txt" https://kemono.party/
[gallery-dl][error] No suitable extractor found for 'https://kemono.party/'

Running the "gallery-dl --list-extractors" command is telling me I have both the extractors "KemonopartyPostExtractor" and "KemonopartyUserExtractor"

mikf commented 3 years ago

The cookie values in your config example need a comma , between them. Since you already have a cookies.txt file, you can also use this option to point to that:

"kemonoparty":
{
    "cookies": "C:/Users/Zyy/gallery-dl/cookies-kemono-party.txt"
},

[gallery-dl][error] No suitable extractor found for 'https://kemono.party/'

https://kemono.party/ on its own is not a recognized URL. It needs to point to a specific user listing or post, e.g. https://kemono.party/SERVICE/user/USER_ID

ZyyDesu commented 3 years ago

The cookie values in your config example need a comma , between them.

Like so? (doesn't work either)

"kemonoparty":
{
    "cookies":
        {
        "__ddg1": "DDG1 HERE",
        "__ddg2": "DDG2 HERE",
        "session": "SESSIONCOOKIE HERE"
        }
},

I tried linking the txt file directly as well, and just tried again, directly copy and pasting your example, and I still get the error.

mikf commented 3 years ago

Is your config file actually in one of the places listed here? You not getting a warning for missing commas and it not working with what you posted in https://github.com/mikf/gallery-dl/issues/1716#issuecomment-885212283 makes me think that this might be the case. (assuming what you posted here is just the kemonoparty section of your entire config file)

You could also try


$ gallery-dl --cookies "C:/Users/Zyy/gallery-dl/cookies-kemono-party.txt" https://kemono.party/fanbox/user/7356311/post/802343
# or
$ gallery-dl -c "C:\path\to\config.file" https://kemono.party/fanbox/user/7356311/post/802343
ZyyDesu commented 3 years ago

I got it working, just before seeing that you posted a new reply. I had the config file as the third option the git page suggests "%USERPROFILE%\gallery-dl.conf" Tried another option, %USERPROFILE%\gallery-dl\config.json, and it worked right away. Worked for both methods. (linking the cookie file / using the code I had in the first place, though with the added commas as you mentioned). And yes, this is just the kemonoparty section of the config.

Thanks for your time and help :)

mikf commented 3 years ago

Weird, both paths should work the same. At least you got it working. https://github.com/mikf/gallery-dl/blob/13d4045a8a5a6fd45cb20df399f44055b25f5cca/gallery_dl/config.py#L28-L29