Getting anime wallpapers from websites.
List of available websites:
alphacoders
,wallpaperflare
,pikabu
,goodfon
npm i awse --save
To get started, export the site you need or several at once.
const { Alphacoders, wallpaperflare, pikabu, goodfon } = require("awse");
Or use the getAnySite
function. It performs a get
function on a random site instance.
const { getAnySite } = require("awse");
pikabu.get({
search: "Neko",
pages: 1
}).then(d => console.log(d.url, d.images, d.pages, d.timeout));
console.log(pikabu.url) // Link to website (https://pikabu.ru/)
getAnySite({
search: "Black Clover",
pages: 2,
minImages: 100
}).then(d => console.log(d.url, d.images, d.pages, d.timeout));
- options
:object
- search options:- search
:string
- the tag by which the search is performed. - pages
:number
- (optional) the number of pages to read (Default to 1). The number may increase if the number of images found is less forminImages
- minImages
:number
- (optional) the minimum number of images to read (Default to 0).
- search
The result of execution will be Promise <Data>
.
Data
- Contains data received from the site:
-
- url
:string
- Link to website. - sources
:Set<string>
- An array of links from which the images were searched for. - images
:Set<string>
- List of image images. - timeout
:number
- Function execution time. - pages
:number
- Number of pages viewed.
- url
-
- randomRange([range])
:string[]
- Selects random images from the list.
- randomRange([range])