Blue-B/Pixiv-Keeper

★ 1Forks 0PythonGitHub ↗Compare
pixivpython

README

Pixiv Keeper

English | 한국어 | 日本語

A modern desktop GUI app for browsing, managing, and downloading your Pixiv bookmarked artworks. Built with Python and Flet, featuring one-click OAuth login, encrypted token storage, and a built-in image viewer.

Python Flet License Platform

Preview

Main Viewer
Main Viewer

Why use Pixiv Keeper

Need What you get
Easy login Browser-based OAuth — no manual token copy-paste
Batch download Download all bookmarked artworks at original quality in one click
Browse offline SQLite-cached bookmarks for instant browsing without re-fetching
Multi-page works Manga and series pages downloaded automatically
Privacy & security Token encrypted locally (Windows DPAPI / Fernet AES-128); never sent externally
Content control R-18 filter, tag filter, author filter
Multi-language English, Japanese, Korean UI

Features

  • One-Click Login — Selenium-powered browser window handles Pixiv OAuth (PKCE) automatically
  • Bookmark Sync — Quick sync (new only) or full sync with progress tracking
  • 5-Tab Navigation — Bookmarks, Recommended, Ranking, Following, Search
  • Built-in Image Viewer — Zoom (scroll wheel, 25% steps), drag-to-pan, multi-page navigation, fullscreen
  • Batch Download — Select individual works or download all; original resolution preserved
  • Bookmark Management — Add/remove bookmarks, public/private toggle
  • Tag & Author Filters — Filter by tag, author, trending tags, or your most-used tags
  • Pagination — 20/50/100/200 items per page with navigation controls
  • Encrypted Token Storage — Windows DPAPI or Fernet AES-128 with machine-unique key
  • Fluent Dark Theme — Windows 11-inspired dark UI with layered backgrounds

Quick Start

Installation

pip install -r requirements.txt

Or install manually:

# Required
pip install pixivpy3 requests flet

# For browser-based login (recommended)
pip install selenium webdriver-manager

# For token encryption (recommended)
pip install cryptography
pip install pywin32          # Windows only

Note: Without cryptography, your token will be stored with Base64 encoding only (not encrypted).

Run

python pixiv_downloader_gui.py
  1. Click "Pixiv Login" — a browser window opens
  2. Log in to Pixiv normally in the browser
  3. The app captures the OAuth callback automatically
  4. Click "Sync" to load your bookmarks
  5. Select artworks and click "Download Selected", or use "Download All"

Tech Stack

Area Details
Language Python 3.8+
GUI Framework Flet (Flutter-based)
Pixiv API pixivpy3
Browser Automation Selenium + webdriver-manager
Database SQLite (settings, download history, bookmark cache)
Encryption Windows DPAPI / Fernet AES-128 (cryptography)
Image Processing Pillow (WebP → JPEG conversion)

Security & Data Storage

Your Pixiv refresh token is stored locally with encryption. It is never sent to external servers.

Data Location Protection
Refresh Token pixiv_downloads/pixiv_data.db (settings table) Windows DPAPI or Fernet AES-128
Encryption Key pixiv_downloads/.encryption_key Hidden file; machine-unique salt
Download History pixiv_downloads/pixiv_data.db Local SQLite
Bookmark Cache pixiv_downloads/pixiv_data.db Local SQLite
Thumbnail Cache pixiv_downloads/.thumb_cache/ Local image files
Downloaded Artworks pixiv_downloads/ Original files from Pixiv
Platform Encryption Method
Windows DPAPI (only the current Windows user can decrypt)
macOS / Linux Fernet AES-128 with PBKDF2-derived machine-unique key
Fallback Base64 encoding (when cryptography is not installed)

Pixiv OAuth credentials (CLIENT_ID, CLIENT_SECRET) in the source code are public credentials from the Pixiv Android app, shared by all unofficial API clients. They are not secrets.

Project Structure

pixiv_downloader_gui.py    # Main application (single-file)
requirements.txt           # Python dependencies
locales/
├── en.json                # English translations
├── ja.json                # Japanese translations
└── ko.json                # Korean translations
assets/
├── icon.png               # App icon
├── screenshot_main.png    # Main UI screenshot
└── screenshot_viewer.png  # Viewer screenshot

Contributing

Contributions are welcome. Please follow these guidelines:

Commit Style

Use Conventional Commits: feat:, fix:, docs:, refactor:, chore:

feat: add tag-based bookmark filtering
fix: resolve thumbnail index mismatch

Code Guidelines

Topic Guideline
I18N Use t("key") for all user-facing strings; add keys to all 3 locale files
UI Updates Wrap page.update() in _safe_update() to prevent AssertionError
Threading Use _run_on_ui() for UI updates from background threads
Style Follow existing patterns; match Fluent Dark theme colors from Colors class

Manual Test Checklist

Scenario Verify
Login flow Browser opens, OAuth completes, token saved
Bookmark sync Quick sync and full sync both work
Download Single, selected, and batch download
Image viewer Zoom, pan, multi-page navigation, fullscreen
Language switch All UI elements update correctly
Filters R-18, tag, author filters work

Acknowledgments

  • pixivpy — Pixiv API library for Python
  • Flet — Python GUI framework powered by Flutter
  • Selenium — Browser automation for OAuth login

Disclaimer

This tool is for personal use only. Downloaded content is intended for private archival of your own bookmarked artworks. Please respect artists and their work:

  • Do not redistribute downloaded artworks
  • Do not use for commercial purposes
  • Comply with Pixiv's Terms of Service
  • Support artists by following them and purchasing their works

The developer is not responsible for any misuse of this software.

License

GPL-3.0 License - This project is licensed under the GNU General Public License v3.0. Any modified versions must also be open-sourced under the same license.

Support

If you find this project useful, consider giving it a star or sponsoring development:

GitHub Sponsors Buy Me A Coffee

Contributors

Blue-B

Issues