Skip to content
Nandaka edited this page Aug 9, 2022 · 15 revisions

Welcome to the PixivUtil2 wiki!

Pixiv login using cookie

  1. Extract the archive and add your username and password in config.ini at [Authentication] section. This is still required for Fanbox oAuth. If config.ini doesn't exists, just run the PixivUtil2.exe or PixivUtil2.py (if you run from source code) at least 1 time to auto-generate it.

    image

  2. Open your browser (I'm using Chrome) and login to your pixiv account. After log in, it will automatically forward you to the main page. I'm using English language (It is accessible by clicking the down arrow next your profile pic in the main page).

    image

  3. Press F12, this will open a DevTools. Navigate to the Network tab and press Ctrl+R to reload the page from DevTools. This will reload the current page and record the traffic from pixiv. Copy the user-agent and update it in config.ini at [Network] section.

    image image

  4. Navigate to Application tab and expand the Cookies. Select https://www.pixiv.net from the list. This will list all cookies from the pixiv server. Search for cookie named = PHPSESSID, then copy the value and paste it to the cookie in your config.ini. The value should be in <member_id>_<random string>, for example: 123456_AaBbccDDeeFFggHHIiJjkkllmMnnooPP. Save your config.ini.

    image image

  5. Check by running PixivUtil2.exe or PixivUtil2.py (if you run from source code). If the login successful, it will show the member_id (should the same as the cookie` and the Pixiv Premium status.

    image

Useful Tips

  1. Handling username changes

    whinette already created a script to handle this (https://github.com/whinette/pixixDownloader_cleaning, Refer to Issue #169).

  2. Running in Windows Environment

    There are 2 Option available:

    1. Download the executable version from the releases page.
    2. Run from source code: see IDE-Enviroment-(Windows)
  3. Running in Linux Environment

    I'm developing the script in Windows environment, so I'm not sure if there is something broken for linux. By right it should be working as long the required libraries are installed (Refer to Issue #176).

Clone this wiki locally