3.2.2 • Published 3 months ago

anime-wallpaper v3.2.2

Weekly downloads
56
License
MIT
Repository
github
Last release
3 months ago

[Documentation]

Get Anime wallpapers based on scrapping from websites.

WebsiteTypeStatus
Hqdwalls NEWImage
Wall HavenImage
ZeroChanImage
Wallpapers.comImage
HoyolabImage
PinterestImage
Moe Walls NEWVideo/Image

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();
  • Getting a random wallpaper from Hqdwalls
const wallpaper = await wallpaper.random({ resolution: "1920x1080" });
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)

Live 2D

const wallpaper = await wallpaper.live2d("Jane Doe");
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: {...}
      }
    ]
  }
}

Pinterest

  • Getting image from pinterest
const wallpaper = await wall.pinterest("Ellen Joe ZzZ");
return console.log(wallpaper)
  • nb: sometimes it might be fail when scraping pinterest, just try again and over again :>

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

3.2.2

3 months ago

3.2.1

5 months ago

3.2.0

5 months ago

3.0.4

7 months ago

3.0.3

7 months ago

3.0.2

7 months ago

3.1.0

7 months ago

3.0.1

7 months ago

3.0.7

7 months ago

3.0.5

7 months ago

3.0.0

7 months ago

2.0.0

1 year ago

1.1.1

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago