You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constGelbooru=require(`../index.js`);constfs=require('fs');constrequest=require('request');consttags='yuri';// provide tags hereconstGelbooruClient=newGelbooru(tags);// create new instance of GelbooruGelbooruClient.getRandomPost(tags,10,0).then(post=>{// get random postconstdw=request(post.file_url).pipe(fs.createWriteStream(`./${post.id}.jpg`));// download postdw.on('finish',()=>{// when download is finishedconsole.log(`Downloaded ${post.id}`);// print post id});})