Pixiv Downloader

📢 This article was translated by gemini-3-flash-preview

2025-05-18 Update
I wrote a SQLite version so you don’t have to configure a database. Details: https://blog.yexca.net/archives/248

It took three days to whip up a usable version, though there’s no error handling—if it crashes, just restart it.

Project Link: https://github.com/yexca/PixivDownloader-MySQL

Introduction

This started with Recording Downloaded Artist Works in a Database . I had a database for tracking my downloaded works, but eventually, I realized I was doing repetitive manual labor. Repetitive tasks are exactly what computers are for. I recently felt like building an app and wasn’t satisfied with this one: https://github.com/yexca/yasumiProject . Since I had some free time during the holidays, I started writing.

Description

I managed to get it working, but there’s no error handling or anything like that. It’s “barely functional.” Also, the code is a mess (it’s my first time developing a relatively large GUI app)—messy enough that I don’t even want to refactor it or add internationalization support.

During development, I suddenly realized that since I was writing a program anyway, I should have just used SQLite. Setting up a MySQL instance is a hassle. But since I already built it this way, I’m sticking with it.

Lastly, I thought about packaging it into an EXE, but because it uses a config file, packaging became a pain (and at the start, Windows kept flagging the output as a virus). I’m too lazy to mess with it further, so it stays as-is.

UI

Background image: https://www.pixiv.net/artworks/83273073

  • Home

home

  • Settings

settings

Configuration

Since this was developed based on my existing database, there is almost no customization. The SQL table schema is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
CREATE TABLE pic (
    ID varchar(99),
    # Unique Identifier
    name varchar(255),
    # Artist Nickname
    downloadedDate datetime,
    # Download/Update Time
    lastDownloadID varchar(255),
    # Latest Work ID
    platform varchar(50),
    # Platform
    url varchar(255),
    # Link
    PRIMARY KEY(ID)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

The API requires authentication and doesn’t support logging in via username/password. Follow https://gist.github.com/ZipFile/c9ebedb224406f4f11845ab700124362 to get an Auth Token.

I didn’t upload the background image to the Git repo. The path is app\resources\images\background.png.

You need Python installed. Install dependencies with:

1
pip install -r requirements.txt

Usage

Run the program:

1
python main.py

Complete the configuration in the Pixiv Auth and Settings tabs, then return to the Home page.

Enter an Artist ID or a specific Work ID, and it will automatically crawl all works by that artist.

Conclusion

I honestly don’t think I’ll even use this myself, but it counts as a small step in my development journey.

yexca-211

This post is licensed under CC BY-NC-SA 4.0 by the author.
Last updated on 2025-05-18 16:20 +0900