1.1.5 • Published 1 year ago

deru-yandex-images v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

yandex-images-api

Becouse official yandex images api does not exists, i wrote parser for yandex images.

(parser can work unstable, becouse yandex periodically usage captca for checking requests)

Installation

npm i deru-yandex-images --save

How Usage?

Import plugin with module or require type.

import ImageParser from 'deru-yandex-images';

or

require ImageParser = require('deru-yandex-images');

Use new instance of Parser:

(Promise format)

new ImageParser({ params })
    .getImages()
    .then(res => console.log(res))
    .catch(err => console.error(err));

(async await format)

try {
    const images = await new ImageParser({ params }).getImages();

    console.log(images);
} catch (err) {
    console.error(err);
}
/**
 * return Object
 * 
 * example:
 * {
 *  items: ['image1.png', 'image2.png'],
 *  page: 1
 * }
 */

Params

ProptypeDescription
textStringValue for search
countNumberCount of returned images
pageNumberPage number
pageRangeNumberSet random page of range 1-pageRange
1.1.5

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago