Skip to content

Inadequado4192/awse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

Getting anime wallpapers from websites.

List of available websites: alphacoders, wallpaperflare, pikabu, goodfon

npm Package License Language

Installation

npm i awse --save

How to use?

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");

Usage example

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));

Parameters of the get(options) function

  • 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 for minImages
    • minImages :number - (optional) the minimum number of images to read (Default to 0).

The result of executing the get function

The result of execution will be Promise <Data>. Data - Contains data received from the site:

  • Properties:

    • 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.
  • Methods:

    • randomRange([range]) :string[] - Selects random images from the list.

About

Getting anime wallpapers from websites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published