pixiv-img-dl
a simple way to save pixiv images to local using nodejs
Installation
npm i pixiv-img-dl --save
Test
npm test
API
fetch(imgUrl[, savePath])
- imgUrl: pixiv image url, just a string
- savePath: path to save image, it should be a existed directory. by default it's
path.resolve('./images')
. - return value: a promise.
example
const pixiv = ;const url = 'https://i.pximg.net/img-original/img/2017/05/01/23/42/02/62683748_p0.png'; pixiv ;
fetchAll(imgUrls, concurrencyQueue[, savePath])
- imgUrls: a array of imgUrl.
- concurrencyQueue: an array of concurrency, eg. [10,5,2], the first time, concurrency is 10, if someting failed, it will retry in concurrency 5, finally 2.
example
const pixiv = ;const urls = 'https://i.pximg.net/img-original/img/2017/05/01/23/42/02/62683748_p0.png' 'https://i.pximg.net/img-original/img/2017/05/20/15/28/57/62982851_p0.png'; pixiv // undefined ;
Cotact me
License
MIT © sino