Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Simple tool that downloads Pixiv user custom emotes

License

Notifications You must be signed in to change notification settings

torikushiii/pixiv-emote-scraper

Repository files navigation

pixiv-emote-scraper

This is a simple tool that fetch and download user custom emoji from Pixiv Emoji Month

Prerequisites

  • Node.js: ^16.0.0
  • Yarn similar to Node.js
  • NPM or any other Node.js package manager

Installation

Install packages with your preferred package manager, e.g. npm:

yarn/npm install

Usage

Please create folder named emotes before running the script.

To get your refresh_token, Please follow this guide to obtain your refresh token.

To get your cookie, go to Pixiv and use dev tools to obtain your cookie from request header.

After that your config.js should look like this:

const config = {
    // Cookie should starts with first_visit_datetime_pc or PHPSESSID=
    "cookie": "YOUR_PIXIV_COOKIE",
    "access_token": "Cxnw92XXXXXXXXXXXXX",
    "refresh_token": "KylASXXXXXXXXXXXXX",
    "userAgent": "", // Use this if you encountered cloudflare (use the user agent from your browser where you are logged in)
    "expires_in": 0
};

module.exports = config;

To download all user emojis, use:

const api = new Pixiv(config);

await api.getAll();

To search for specific emote, use:

const api = new Pixiv(config);

const res = await api.getEmojisBySearch("gura");

About

Simple tool that downloads Pixiv user custom emotes

Topics

Resources

License

Stars

Watchers

Forks