anime-wallpaper
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

Anime Wallpaper

Version Anime Wallpaper on npm

Get Anime wallpapers based on scrapping from websites.


Version

Installing

npm install anime-wallpaper

or

yarn add anime-wallpaper

Example Usage from Website

At the head of your file, start by importing the necessary classes

const { AnimeWallpaper, AnimeSource } = require('anime-wallpaper');
const wallpaper = new AnimeWallpaper();
const wallpaper = await wallpaper.random();
return console.log(wallpaper)
const wallpaper = await wall.search({ title: "firefly honkai", page: 1, type: "sfw", aiArt: true }, AnimeSource.WallHaven);
return console.log(wallpaper)
const wallpaper = await wallpaper.search({ title: "Keqing" }, AnimeSource.Wallpapers);
return console.log(wallpaper)
const wallpaper = await wallpaper.search({ title: "Misaka Mikoto" }, AnimeSource.ZeroChan);
return console.log(wallpaper)

Hoyolab Example

  • Get fanart from hoyolab
const wallpaper = await wall.Hoyolab({ game: "GenshinImpact", postType: "Trending" });
return console.log(wallpaper)

Result

{
  data: {
    list: [
      {
        game: {...},
        post: {...},
        topics: [{...}]
        user: {...}
      }
    ]
  }
}

Warning

In some rare cases, the fetching process might fail due to inconsistencies when scraping websites.

Contributors

Fork then clone the project and install its dependencies:

npm i

In the root folder of the project type the following to compile the .ts into .js

tsc

© Aizuu

Package Sidebar

Install

npm i anime-wallpaper

Weekly Downloads

7,514

Version

3.1.0

License

MIT

Unpacked Size

45.5 kB

Total Files

22

Last publish

Collaborators

  • izuu4302