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. You can also check by downloading age-restricted post.

    image

    image

Fanbox login using cookie

  1. Continue from above steps. This time open your browser (I'm using Chrome) and login to your Fanbox account. If you already logged in to your pixiv account, it will ask to continue to use your existing pixiv account. After successful login, it will forward you to the main page. Please note that I'm also using English as the language. It is changeable by clicking your profile pic and selecting the language (last item) in the drop down list.

  2. Press F12, this will open a DevTools. I assume you are using the same browser to log in to your pixiv account, so we can skip to copy the user agent, else follow Step #3 from above.

  3. Navigate to Application tab and expand the Cookies. Select https://www.fanbox.cc from the list. This time search for cookie named FANBOXSESSID, and then copy the value, and paste it to cookieFanbox in your config.ini. It should follow the same format like your pixiv cookie (<member_id>_<random string>, for example: 123456_AaBbccDDeeFFggHHIiJjkkllmMnnooPP). Save your config.ini.

    image

  4. Check by running PixivUtil2.exe or PixivUtil2.py (if you run from source code). You can check it by downloading a post that accessible from your account. Please note that this application doesn't give free access to all the contents. You still need to be subscribed to the author to be able to download their premium contents.

    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).