PROTOCOL
Specify the protocol of example URLs on index page. It may be useful when you are using a HTTPS CDN, for examplehttps:
.HOST
Specify the host of example URLs on index page. Can contain port number.USER_AGENT
UA used to request Pixiv image. If not provided, the default UA of axios will be used. Normally, it's OK.PIXIV_CLIENT_REFRESH_TOKEN
Due to the limitations of Pixiv, the ajax API is not available now (see #8).
So by default this project use HibiAPI's public API server to get illust data, but you may also get rate limit error.
You can provide a Pixiv client refresh token to enable this project to directly request the Pixiv client api. In this case, it is recommended to deploy the service in a stateful container. It is not recommended to use serverless, otherwise it may affect your pixiv account.
You can use any packet capturing tool to grab from the Pixiv mobile application, or log in using the script provided by this project.
Here is how to use the login script:
- Node.js is required. Clone this repository.
- Run
npm i
to install dependencies, then runnpm run pixiv:login
to start the login script. - Open the login URL, but don't log in.
- Open browser developer tools F12, switch to the "Network" tab.
- Log in, and finally you will get a blank page.
- Find the request with the word "login" at the bottom of the network request list.
- Switch to the "Payload" tab on right panel, then copy the code.
- Paste back into the command line, press Enter.
- The refresh token should be printed.