Git Product home page Git Product logo

pppixiv's Introduction

pppixiv

build image issue license last_commit

Get links to pixiv illustrations and links to download illustrations via our api. Please note that this project is a subproject of tg-dumb-bot. Since the current api is designed for tg-dumb-bot, you don't have easy access to the links we return (telegram comes with previews). For example, you need to call the pixivAPI variable inside our service to use the download link. Also you can modify our source code directly. We will provide more features for this project later.

Usage

Build with Docker

Build your docker image and run it.

# build locally
$ docker build . -t pixiv
# run on detach (notice : -v will specify the folder where the illustrations will be downloaded)
$ docker run -d -p 3333:5000 -e username="your_pixiv_accout_name" -e password="your_pixiv_account_password" -v /Your/local/path/dir:/APP/Illusts pixiv
# run in foreground
$ docker run -it -p 3333:5000 -e username="your_pixiv_accout_name" -e password="your_pixiv_account_password" -v /Your/local/path/dir:/APP/Illusts pixiv

If you successfully run this image up, you can run the test.py file to see the output. The first time will be slower because you have to get the pixiv token.

$ python3 test.py # Make sure you have the requests library installed

Use DockerHub Image

Pull our built image directly.

$ docker pull godmountain/pppixiv:latest
$ docker run -d -p 3333:5000 -e username="your_pixiv_accout_name" -e password="your_pixiv_account_password" -v /Your/local/path/dir:/APP/Illusts godmountain/pppixiv:latest

Run the code without docker

Create .env file and Illusts folders.

.
├── .env 👈🏻 Paste your pixiv account and password into the .env file.
├── Illusts 👈🏻 Create the Illusts folder in the root directory of the project.
├── Dockerfile
├── LICENSE
├── README.md
├── app.py
├── image
├── main.py
├── requirements.txt
├── router
├── run.sh
├── services
├── static
├── templates
└── test.py

.env should like 👇🏻

username=xxx
password=xxx

Add chromedriver to your environment variable. (Notice : The chromedriver version should be the same as the chrome browser you downloaded.) Please google how to set chromedriver environment variables by yourself. Then execute the following two commands after you have set up chromedriver.

$ pip3 install -r requirements.txt
$ python3 main.py

Visit our dashboard

Visithttp://ip:port/dashboard.You will see 👇🏻 Then enter the uid and click the search button, all the illustrations of the user with the specified uid will be searched and displayed on the right side.

Click the download button and all illustrations will be downloaded. If the download is successful, the gray dot on the right will turn green. Failed downloads will turn red.

After the illustration is downloaded successfully you will see the following message.

Click the Preview button to preview the illustration you just downloaded.

The artist in this example is referenced from 仁井学.

Api for accessing our pixiv services

Visithttp://ip:port/getIllustListByUidand post data {"uid":"xxx"}.You will get 👇🏻

status : 0 stands for failure while 1 stands for success
message : error message
list : returned data

{
  "status": 1,
  "message": "message",
  "list": [
    {"title": "title1", "url": "preview_url", "download_url":  "download_url"},
    {},
    {},
  ]
}

Visithttp://ip:port/getIllustRankingand post data {"mode":"xxx"}. (We have mode: day, week, month, day_male, day_female, week_original, week_rookie, day_manga) You will get 👇🏻

{
  "status": 1,
  "message": "message",
  "list": [
    {"title": "title1", "url": "preview_url", "download_url":  "download_url"},
    {},
    {},
  ]
}

Visithttp://ip:port/getTrendingTags. You will get 👇🏻

{
  "status": 1,
  "message": "message",
  "list": [
    {"tag": "JP version(Unicode)", "translated_tag": "EN version"},
    {},
    {},
  ]
}

Visithttp://ip:port/getIllustDownloadUrland post data {"illust_id":"xxx"}. You will get 👇🏻

{
  "status": 1,
  "message": "message",
  "list": [
    {"title": "title", "url": "preview_url", "download_url":  "download_url"},
  ]
}

Contributing

Contributions must be available on a separately named branch based on the latest version of the main branch.

pppixiv's People

Contributors

mgmcn avatar rio98 avatar

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.