1.4.6 • Published 3 years ago

awse v1.4.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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.
1.4.6

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago