Get Anime wallpapers based on scrapping from websites.
npm install anime-wallpaper
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 4K Wallpapers
const wallpaper = await wallpaper.random();
- Getting Wallpaper from WallHaven
const wallpaper = await wallpaper.search({ title: "Misaka Mikoto" }, AnimeSource.WallHaven);
- Getting Wallpaper from ZeroChan
const wallpaper = await wallpaper.search({ title: "Misaka Mikoto" }, AnimeSource.ZeroChan);
In some rare cases, the fetching process might fail due to inconsistencies when scraping websites.
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