UNPKG

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

45 lines (38 loc) 1.42 kB
// [Plugins Igstalk] // By Fruatre // wa.me/6285817597752 // Channel: https://whatsapp.com/channel/0029VaNR2B6BadmioY6mar3N const cheerio = require("cheerio"); const axios = require("axios"); const stalkig = async (username) => { const url = `https://greatfon.io/v/${encodeURIComponent(username)}`; try { const { data } = await axios.get(url, { headers: { 'User-Agent': 'Mozilla/5.0', 'Accept-Language': 'en-US,en;q=0.9', 'Referer': 'https://greatfon.io', }, }); const $ = cheerio.load(data); const user = $('h1.text-4xl').text().trim() || 'Not found'; const bio = $('.items-top .text-sm').text().trim() || 'No bio available'; const post = $('.stat-title:contains("Posts")').siblings('.stat-value').text().trim() || '0'; const followers = $('.stat-title:contains("Followers")').siblings('.stat-value').text().trim() || '0'; const profilePicture = $('figure img').attr('src') || 'https://via.placeholder.com/150'; return { author: "Herza", status: 200, data: { user, bio, post, followers, profilePicture, }, }; } catch (error) { throw new Error("Error fetching data."); } }; module.exports = { stalkig };