mikf / gallery-dl

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

[Pixiv] How to set PHPSESSID? #6448

Open Tester6893 opened 1 week ago

Tester6893 commented 1 week ago

I got the following warning when trying to download a pixiv gallery: [pixiv][warning] No 'PHPSESSID' cookie set. Can detect only non R-18 'sanity_level' works.

I used oauth:pixiv.

The warning is fairly new and I haven't seen it before. I've found the PHPSESSID cookie, but now I have no idea where I should enter it. Is there a way to input the PHPSESSID through the command line or any way to set the PHPSESSID at all?

kattjevfel commented 1 week ago

You need to add it to extractor.pixiv.cookies, like so:

{
    "extractor": {
        "pixiv": {
            "refresh-token": "<snip>",
            "cookies": {
                "PHPSESSID": "<snip>"
            }
        }
    }
}
mikf commented 1 week ago

You could also use --cookies-from-browser or --cookies on command-line.

edit: Cookies guide

The PHPSESSID cookie is only necessary to detect the few, otherwise hidden, "limit_sanity_level_360.png" works (see #4327), which are left out of the mobile API results used by gallery-dl.