notmebotz-tools
Version:
Sebuah Tools yang berfungsi untuk mendownload Video atau Foto dari media sosial, serta sebagai tools yang berguna untuk aplikasi kamu seperti untuk BOT
30 lines (26 loc) • 695 B
JavaScript
const axios = require("axios");
const cheerio = require("cheerio");
const stickerLy = async (urlSticker) => {
try {
let { data: a } = await axios.get(urlSticker);
let $ = cheerio.load(a);
let stickers = [];
$('#content_images .sticker_img').each((i, el) => {
stickers.push($(el).attr('src'));
});
return {
author: "Herza",
status: 200,
data: stickers
};
} catch (error) {
console.error(error);
return {
author: "Herza",
status: 500,
data: [],
error: error.message
};
}
};
module.exports = { stickerLy };