Git Product home page Git Product logo

pximg-proxy's Introduction

pximg-proxy

Deploy on heroku

Deploy to Glitch

Environment variables

  • PROTOCOL
    Specify the protocol of example URLs on index page. It may be useful when you are using a HTTPS CDN, for example https:.
  • 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.

Get Pixiv client refresh token

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:

  1. Node.js is required. Clone this repository.
  2. Run npm i to install dependencies, then run npm run pixiv:login to start the login script.
  3. Open the login URL, but don't log in.
  4. Open browser developer tools F12, switch to the "Network" tab.
  5. Log in, and finally you will get a blank page.
  6. Find the request with the word "login" at the bottom of the network request list.
  7. Switch to the "Payload" tab on right panel, then copy the code.
  8. Paste back into the command line, press Enter.
  9. The refresh token should be printed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.