mirror of https://github.com/aruppi/aruppi-api
Change module base64
This commit is contained in:
parent
b88c22b45d
commit
4dfc28c1db
|
@ -871,6 +871,14 @@
|
|||
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz",
|
||||
"integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q=="
|
||||
},
|
||||
"node-base64-image": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/node-base64-image/-/node-base64-image-2.0.1.tgz",
|
||||
"integrity": "sha512-lXsYTCWsknb4Hvbdv51VQVGkfXWBn57NrR5LgR9wyj7uB6XNefICw2LUDK58lv1erhjHDP1r3l4uGOMnLMtn/g==",
|
||||
"requires": {
|
||||
"axios": "0.19.2"
|
||||
}
|
||||
},
|
||||
"node-expat": {
|
||||
"version": "2.3.18",
|
||||
"resolved": "https://registry.npmjs.org/node-expat/-/node-expat-2.3.18.tgz",
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"cors": "^2.8.5",
|
||||
"express": "^4.16.4",
|
||||
"helmet": "^3.22.0",
|
||||
"image-to-base64": "^2.1.0",
|
||||
"node-base64-image": "^2.0.1",
|
||||
"npm": "^6.14.5",
|
||||
"request": "^2.88.0",
|
||||
"rss-to-json": "^1.1.1"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const cloudscraper = require('cloudscraper')
|
||||
const imageToBase64 = require("image-to-base64");
|
||||
const cheerio = require('cheerio');
|
||||
const base64 = require('node-base64-image');
|
||||
|
||||
const {
|
||||
BASE_ANIMEFLV, BASE_JIKAN, BASE_EPISODE_IMG_URL
|
||||
|
@ -236,12 +236,7 @@ const animeExtraInfo = async(title) =>{
|
|||
};
|
||||
|
||||
const imageUrlToBase64 = async(url) => {
|
||||
|
||||
let base64image = ""
|
||||
|
||||
await imageToBase64(url).then((response) => {base64image = response})
|
||||
|
||||
return base64image.toString("base64");
|
||||
return await base64.encode(url, {string:true});
|
||||
};
|
||||
|
||||
/*const imageUrlToBase64 = async(url) => {
|
||||
|
|
Loading…
Reference in New Issue