From a4b90d3ed117df7545f3ae2dc4a17bba6a7a6f01 Mon Sep 17 00:00:00 2001 From: grumbulon Date: Sat, 2 Apr 2022 20:33:34 -0400 Subject: [PATCH] Download working --- src/helpers/API.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/helpers/API.js b/src/helpers/API.js index 4f08b1d..0b5a3d7 100644 --- a/src/helpers/API.js +++ b/src/helpers/API.js @@ -1,5 +1,6 @@ const request = require("request"); const parseConfig = require("./config"); +const downloadFromBooru = require("./download"); function search() { let configFile = "./config.json"; @@ -15,11 +16,9 @@ function search() { if (err) { return console.log(err); } + console.log(body) + downloadFromBooru.downloadFromBooru(body.large_file_url, `./img/${body.id}.png`) - console.log(body.id); - console.log(body.created_at); - console.log(body.rating); - console.log(body.large_file_url); } ); });