Skip to main content

A command line tool to download images from Pixiv.

Project description

pixi

Build Status Coverage Status Pypi Pyversions

A command line tool to download illustrations from Pixiv.

Usage: pixi [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  artist     Download illustrations of an artist by URL or ID.
  auth       Log into Pixiv and generate a refresh token.
  bookmarks  Download illustrations bookmarked by a user.
  config     Edit the config file.
  failed     View illustrations that failed to download.
  illust     Download an illustration by URL or ID.
  migrate    Upgrade the database to the latest migration.
  wipe       Wipe the saved history of downloaded illustrations.

Usage

This tool can be installed from PyPI as pixi.

$ pip install --user pixi

After installation, create the database and configure pixi with the following commands.

$ pixi migrate  # Migrate the database
$ pixi config  # Configure pixi

Refer to the configuration section for details on the various configuration options.

Now you can begin downloading!

For example, the following commands download an illustration. pixi accepts both a URL to the illustration as well as just the illustration ID. The same applies to all inputs that accept ID values.

$ pixi illustration https://www.pixiv.net/member_illust.php?mode=medium&illust_id=64930973
$ pixi illustration 64930973

Downloading all the illustrations of an artist can be done with the following command.

$ pixi artist https://www.pixiv.net/member.php?id=2188232

Bookmarks, public and private, can be downloaded with the following command.

$ pixi bookmarks

The public bookmarks of other users can also be downloaded.

$ pixi bookmarks --user https://www.pixiv.net/member.php?id=2188232

And the following command downloads all bookmarks matching a user-assigned bookmark tag.

$ pixi bookmarks --tag "has cats"

To view all the options available to a specific command, run the command with the --help flag. For example, illustration's options can be viewed with the following command.

$ pixi --help illustration

When downloading many images from an artist or a user's bookmarks, an image can occasionally fail to download. If an image fails to download after several retries, it will be recorded and skipped. Failed images can be viewed with the following command.

$ pixi failed

If an image on the failed list is successfully downloaded, it will automatically be removed from the list. To wipe the entire failed list, the following command should be run.

$ pixi wipe --table=failed

pixi also keeps track of which illustrations have been downloaded and will avoid downloading duplicate illustrations. However, if you wish to re-download illustrations, pass the --allow-duplicates (or -a) flag.

By default, illustration downloads will be tracked if they are downloaded to the default downloads directory and not tracked if they aren't. This behavior can be manually set with the --track/--no-track (or -t/-T) flag.

If you wish to wipe the database of tracked downloads, run the following command and confirm the action.

$ pixi wipe --table=downloads

Configuration

The configuration file is in ini format. A demo configuration is included below. To run pixi, a default download directory must be configured.

[pixi]
; Leave this blank; the script will auto-populate it.
refresh_token =
; The default directory for illustrations to be downloaded to.
download_directory = /home/azuline/images/pixiv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixi-1.0.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixi-1.0.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pixi-1.0.0.tar.gz.

File metadata

  • Download URL: pixi-1.0.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.5 Linux/4.19.97-gentoo

File hashes

Hashes for pixi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c6a64f214ef4c4a06da8fee5990cd74fcecfd3f2624b641c195aae05cf763bc0
MD5 3d3e4b187c26ab99ce3b528ba6567bee
BLAKE2b-256 809a4305fdac0fc7f0d7fa513339ba5e696b4b63378163a8d5ca961331513936

See more details on using hashes here.

File details

Details for the file pixi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pixi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.5 Linux/4.19.97-gentoo

File hashes

Hashes for pixi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0fb65d16fb5bdf62623d76522ba579095d04b6ce58797cc501b15cc378e41f0
MD5 57b32da60dfb56cda7dec81b5f19c725
BLAKE2b-256 7c15157977d3802069f07004c310d14a38a0d49b98f6af503dc399f6e8c543d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page