FITUR STORY ANIME
- TYPE CASE
- Created By Fahri
case 'storyanime': {
const fetch = require('node-fetch');
const cheerio = require('cheerio');
m.reply(mess.wait);
async function animeVideo() {
const url = 'https://shortstatusvideos.com/anime-video-status-download/';
const response = await fetch(url);
const html = await response.text();
const $ = cheerio.load(html);
const videos = [];
$('a.mks_button.mks_button_small.squared').each((index, element) => {
const href = $(element).attr('href');
const title = $(element).closest('p').prevAll('p').find('strong').text();
videos.push({ title, source: href });
});
const randomIndex = Math.floor(Math.random() * videos.length);
return videos[randomIndex];
}
const video = await animeVideo();
if (video) {
let aras = `Judul: ${video.title}\nLink: ${video.source}`;
await vioo.sendMessage(
m.chat,
{ video: { url: video.source }, caption: aras, ptv: true, mimetype: "video/mp4" },
{ quoted: m }
);
} else {
m.reply("Tidak ada video yang ditemukan.");
}
}
break;
Sumber: https://whatsapp.com/channel/0029Vb1u3YuHQbS19aUm4D2p