1.0.0 • Published 3 years ago

@technizor/pixiv-fanbox-exporter v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

pixiv-fanbox-exporter

A utility for performing a batch download of Pixiv FANBOX post assets. This application will assets the supported creators of the user account used.

Since the JSON API for Pixiv FANBOX creator post listing does not appear to work outside of XHR requests from a browser, this uses the Puppeteer to perform web scraping to retrieve the post and asset URLs, as well as automating a login.

Relative to the working directory, posts are cached as posts.json, and cookies are cached as cookies.json to avoid logging in when possible. Downloaded assets are exported to the assets directory and can be moved without causing the utility to redownload as long as posts.json is untouched.

Usage

Running this utility in a docker container is highly recommended due to the Puppeteer dependency (which will install an instance of Chrome).

If you are using VS Code Remote - Containers extension, set the appropriate environment variables using the account credentials in .devcontainer/devcontainer.env (this is ignored by the repository to prevent accidental commits).

An example of a devcontainer.env file with unset environment variables is included .devcontainer/example-devcontainer.env.

Environment Variables (.devcontainer/devcontainer.env)

PIXIV_USERNAME=<Pixiv Account Username>
PIXIV_PASSWORD=<Pixiv Account Password>

Build and run the application:

npm run build                      # Build the application
node out --help                    # Check the application's options
node out --login --browse_creators # Run the application, log in with the provided credentials,
                                   # and retrieve the current list of posts by your supported creators.