UNPKG

zimbot-v4

Version:

Multi device wa bot created by Zim Bot Inc.

1,223 lines (1,176 loc) 65 kB
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈ //▮ZIM BOT INC 2022 ®️ALL RIGHTS RESERVED //▮ //▮FORK AND DON'T FORGET TO GIVE A STAR //▮ //▮THIS SOFTWARE IS UNDER UZ COPYRIGHT //▮ //▮REPORT ABUSE OF THIS SOFTWARE EMAIL US //▮reinhardtuna@mail.uk //▮WHATSAPP US : +44 7441 437150 //▮YOUTUBE CHANNELL: https://youtube.com/c/DRIPSOFC //▮ //╰▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ // //┏━━━━━━━━━━━━━━━━━━━━━━━━━ //┃THIS SOFTWARE INCLUDES //┃SOME ENCRYPTED FILES //┃ //┃THANKS FOR CHOOSING ZIMBOT //┃THANKS TO DIKA ARDNT //┗━━━━━━━━━━━━━━━━━━━━━━━━━ // const axios = require('axios') const cheerio = require('cheerio') const fetch = require('node-fetch') const qs = require("qs") function upload (media) { return new Promise(async (resolve, reject) => { try { let { ext } = await fromBuffer(media) console.log('Uploading image to server telegra.ph') let form = new FormData() form.append('file', media, 'tmp.' + ext) await fetch('https://telegra.ph/upload', { method: 'POST', body: form }) .then(res => res.json()) .then(res => { if (res.error) return reject(res.error) resolve('https://telegra.ph' + res[0].src) }) .catch(err => reject(err)) } catch (e) { return console.log(e) } }) } function otakudesu(judul){ return new Promise(async(resolve, reject) => { axios.get('https://otakudesu.moe/?s=' + judul + '&post_type=anime') .then(({ data }) => { const $ = cheerio.load(data) const result = {}; let limk = $('#venkonten > div > div.venser > div > div > ul > li:nth-child(1) > h2 > a').attr('href') axios.get(limk).then(({ data }) => { const $$ = cheerio.load(data) result.message = 'By Hexagon' result.img = $$('#venkonten > div.venser > div.fotoanime').find('img').attr('src') $$('#venkonten > div.venser > div.fotoanime > div.infozin > div').each(function(a, b) { result.judul = $$(b).find('p:nth-child(1)').text().replace('Judul: ','') result.jepang = $$(b).find('p:nth-child(2)').text().replace('Japanese: ','') result.rate = $$(b).find('p:nth-child(3)').text().replace('Skor: ','') result.produser = $$(b).find('p:nth-child(4)').text().replace('Produser: ','') result.tipe = $$(b).find('p:nth-child(5)').text().replace('Tipe: ','') result.status = $$(b).find('p:nth-child(6)').text().replace('Status: ','') result.episode = $$(b).find('p:nth-child(7)').text().replace('Total Episode: ','') result.durasi = $$(b).find('p:nth-child(8)').text().replace('Durasi: ','') result.rilis = $$(b).find('p:nth-child(9)').text().replace('Tanggal Rilis: ','') result.studio = $$(b).find('p:nth-child(10)').text().replace('Studio: ','') result.genre = $$(b).find('p:nth-child(11)').text().replace('Genre: ','') result.desc = $$('#venkonten > div.venser > div.fotoanime > div.sinopc').text().replace('.','\n') + $$(b).find('div.sinopc > p:nth-child(2)').text() result.batch = $$('#venkonten > div.venser > div:nth-child(10) > ul > li > span:nth-child(1) > a').attr('href') }) const lim = $$('#venkonten > div.venser > div:nth-child(10) > ul > li > span:nth-child(1) > a').attr('href') axios.get(lim).then(({ data }) => { const $$$ = cheerio.load(data) result.batchSD = $$$('#venkonten > div:nth-child(6) > ul > li:nth-child(1) > a:nth-child(3)').attr('href') result.batchHD = $$$('#venkonten > div:nth-child(6) > ul > li:nth-child(3) > a:nth-child(3)').attr('href') resolve(result) }) }) }) .catch(reject) }) } function covid(){ return new Promise(async(resolve, reject) => { axios.get('https://covid19.go.id/') .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) { const pindo = $(b).find('div:nth-child(3) > strong').text() const mindo = $(b).find('div:nth-child(5) > strong').text() const sindo = $(b).find('div:nth-child(4) > strong').text() const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim() $('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) { const neg = $(d).find('div:nth-child(3) > strong').text() const pglo = $(d).find('div:nth-child(4) > strong').text() const nglo = $(d).find('div:nth-child(5) > strong').text() const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim() const result = { message: 'By Hexagon', indo : { positif_indo: pindo, meninggal_indo: mindo, sembuh_indo: sindo, update_indo: upindo.split(':')[1] }, global: { negara: neg, positif: pglo, meninggal: nglo, update: up.split(':')[1].split('\n')[0] } } hasil.push(result) }) }) resolve(hasil) }) .catch(reject) }) } function ongoing(){ return new Promise((reject,resolve) => { axios.get('https://otakudesu.moe/ongoing-anime/').then(({ data}) => { const $ = cheerio.load(data) const result = []; const img = []; const epz = []; const ne = []; const th = []; const ep = []; const nm =[]; $('div.detpost').each(function(a,b) { img.push($(b).find('img').attr('src')) nm.push($(b).find('h2').text()) th.push($(b).find('a').attr('href')) }) $('div.epztipe').each(function(d,c) { epz.push($(c).text()) }) $('div.newnime').each(function(f,g) { ne.push($(g).text()) }) $('div.epz').each(function(m,n){ ep.push($(n).text()) }) for( let i = 0; i < img.length; i++){ result.push({ nama: nm[i], image: img[i], episode: ep[i], setiap: epz[i], rilis: ne[i], link: th[i] }) } resolve(result) }) .catch(reject) }) } function komiku(judul) { return new Promise(async(resolve,reject) => { axios.get('https://data3.komiku.id/cari/?post_type=manga&s=' + encodeURIComponent(judul)) .then(({ data }) => { const $ = cheerio.load(data) const img = []; const or = []; const ind = []; const up = []; const des = []; const li = []; const ch = []; const ch1 = []; $('div.daftar').each(function (a,b) { img.push($(b).find('img').attr('data-src')) $('div.kan').each(function(c,d) { or.push($(d).find('h3').text().trim()) ind.push($(d).find('span.judul2').text()) li.push('https://komiku.id' + $(d).find('a').attr('href')) up.push($(d).find('p').text().trim().split('. ')[0]) des.push($(d).find('p').text().trim().split('. ')[1]) ch1.push($(d).find('div:nth-child(5) > a').attr('title')) $('div.new1').each(function(e,f) { ch.push($(f).find('a').attr('title')) }) }) }) for (let i = 0 ; i < img.length; i++) { resolve({ image: img[i], title: or[i], indo: ind[i], update: up[i], desc: des[i], chapter_awal: ch[i], chapter_akhir: ch1[i], link: li[i] }) } }) .catch(reject) }) } function tebakgambar() { return new Promise(async(resolve, reject) => { axios.get('https://jawabantebakgambar.net/all-answers/') .then(({ data }) => { const $ = cheerio.load(data) const result = []; let random = Math.floor(Math.random() * 2836) + 2; let link2 = 'https://jawabantebakgambar.net' $(`#images > li:nth-child(${random}) > a`).each(function(a, b) { const img = link2 + $(b).find('img').attr('data-src') const jwb = $(b).find('img').attr('alt') result.push({ message: 'By Hexagon', image: img, jawaban: jwb }) resolve(result) }) }) .catch(reject) }) } function surah2(no){ return new Promise(async(resolve, reject) => { axios.get('https://kalam.sindonews.com/surah/' + no) .then(({ data }) => { const $ = cheerio.load(data) const result = []; const ar = []; const id = []; const lt = []; const au = []; $('div.breadcrumb-new > ul > li:nth-child(5)').each(function(c,d) { result.audio = $(d).find('a').attr('href').replace('surah','audioframe') }) $('div.ayat-arab').each(function(a, b) { ar.push($(b).text()) }) $('li > div.ayat-text').each(function(e, f) { id.push($(f).text().replace(',','').trim()) }) $('div.ayat-latin').each(function(g, h) { lt.push($(h).text().trim()) }) for(let i = 0; i < ar.length ; i++){ result.push({ arab: ar[i], indo: id[i], latin: lt[i], }) } resolve(result) }) .catch(reject) }) } function sholat(NOMOR) { return new Promise(async(resolve, reject) =>{ axios.get('https://kalam.sindonews.com/jadwalsholat/' + NOMOR).then(({ data }) => { const $ = cheerio.load(data) const result = {}; $('div.imsakiyah-content').each(function(a, b) { result.Tanggal = $(b).find('tr:nth-child(1) > td:nth-child(1)').text() result.imsak = $(b).find('tr:nth-child(1) > td:nth-child(2)').text() result.subuh = $(b).find('tr:nth-child(1) > td:nth-child(3)').text() result.zuhur = $(b).find('tr:nth-child(1) > td:nth-child(4)').text() result.ashar = $(b).find('tr:nth-child(1) > td:nth-child(5)').text() result.maghrib = $(b).find('tr:nth-child(1) > td:nth-child(6)').text() result.isya = $(b).find('tr:nth-child(1) > td:nth-child(7)').text() }) resolve(result) }) .catch(reject) }) } function lirik(judul){ return new Promise(async(resolve, reject) => { axios.get('https://www.musixmatch.com/search/' + judul) .then(async({ data }) => { const $ = cheerio.load(data) const hasil = {}; let limk = 'https://www.musixmatch.com' const link = limk + $('div.media-card-body > div > h2').find('a').attr('href') await axios.get(link) .then(({ data }) => { const $$ = cheerio.load(data) hasil.thumb = 'https:' + $$('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div').find('img').attr('src') $$('div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function(a,b) { hasil.lirik = $$(b).find('span > p > span').text() +'\n' + $$(b).find('span > div > p > span').text() }) }) resolve(hasil) }) .catch(reject) }) } function chara(query) { return new Promise((resolve, reject) => { axios.get('https://www.wallpaperflare.com/search?wallpaper='+ query,{ headers: { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "_ga=GA1.2.863074474.1624987429; _gid=GA1.2.857771494.1624987429; __gads=ID=84d12a6ae82d0a63-2242b0820eca0058:T=1624987427:RT=1624987427:S=ALNI_MaJYaH0-_xRbokdDkQ0B49vSYgYcQ" } }) .then(({ data }) => { const $ = cheerio.load(data) const result = []; $('#gallery > li > figure > a').each(function(a, b) { result.push($(b).find('img').attr('data-src')) }) resolve(result) }) .catch({status: 'err'}) }) } function wattpad(judul){ return new Promise((resolve, reject) => { axios.get('https://www.wattpad.com/search/' + judul) .then(({data}) => { const $ = cheerio.load(data) const result = []; const jdl = []; const img = []; const des = []; const lnk = []; const red = []; const vt = []; const limk = 'https://www.wattpad.com/' $('div.cover.cover-xs.pull-left').each(function(a,b){ img.push($(b).find('img').attr('src')) }) $('div.content > h5').each(function(a,b) { jdl.push($(b).text().trim()) }) $('div.content > p').each(function(a,b){ des.push($(b).text().trim()) }) $('#results-stories > div > ul > li').each(function(a,b){ lnk.push(limk + $(b).find('a.on-result').attr('data-id')) }) $('div.content > div > small.reads').each(function(a,b){ red.push($(b).text()) }) $('div.content > div > small.votes').each(function(a, b) { vt.push($(b).text()) }) for (let i = 0; i < lnk.length; i++){ result.push({ judul: jdl[i], desc: des[i], vote: vt[i], reads: red[i], image: img[i], link: lnk[i] }) resolve(result) } }) .catch({message: 'err'}) }) } const telesticker = async (url) => { return new Promise(async (resolve, reject) => { packName = url.replace("https://t.me/addstickers/", "") data = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getStickerSet?name=${encodeURIComponent(packName)}`, {method: "GET",headers: {"User-Agent": "GoogleBot"}}) const hasil = [] for (let i = 0; i < data.data.result.stickers.length; i++) { fileId = data.data.result.stickers[i].thumb.file_id data2 = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getFile?file_id=${fileId}`) result = { status: 200, author: author, url: "https://api.telegram.org/file/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/" + data2.data.result.file_path } hasil.push(result) } resolve(hasil) }) } const stickersearch = (query) => { return new Promise((resolve, reject) => { axios.get(`https://getstickerpack.com/stickers?query=${query}`) .then(({ data }) => { const $ = cheerio.load(data) const source = []; const link = []; $('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) { source.push($(b).attr('href')) }) axios.get(source[Math.floor(Math.random() * source.length)]) .then(({ data }) => { const $$ = cheerio.load(data) $$('#stickerPack > div > div.row > div > img').each(function(c, d) { link.push($$(d).attr('src').replace(/&d=200x200/g,'')) }) result = { status: 200, author: author, title: $$('#intro > div > div > h1').text(), sticker_url: link } resolve(result) }) }).catch(reject) }) } function playstore(name){ return new Promise((resolve, reject) => { axios.get('https://play.google.com/store/search?q='+ name +'&c=apps') .then(({ data }) => { const $ = cheerio.load(data) let ln = []; let nm = []; let dv = []; let lm = []; const result = []; $('div.wXUyZd > a').each(function(a,b){ const link = 'https://play.google.com' + $(b).attr('href') ln.push(link); }) $('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){ const name = $(e).text().trim() nm.push(name); }) $('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){ const dev = $(g).text().trim(); dv.push(dev) }) $('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){ const limk = 'https://play.google.com' + $(i).attr('href'); lm.push(limk); }) for (let i = 0; i < ln.length; i++){ result.push({ name: nm[i], link: ln[i], developer: dv[i], link_dev: lm[i] }) } resolve(result) }) .catch(reject) }) } function linkwa(nama){ return new Promise((resolve,reject) => { axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search='+ nama +'&searchby=name') .then(({ data }) => { const $ = cheerio.load(data); const result = []; const lnk = []; const nm = []; $('div.wa-chat-title-container').each(function(a,b){ const limk = $(b).find('a').attr('href'); lnk.push(limk) }) $('div.wa-chat-title-text').each(function(c,d) { const name = $(d).text(); nm.push(name) }) for( let i = 0; i < lnk.length; i++){ result.push({ nama: nm[i].split('. ')[1], link: lnk[i].split('?')[0] }) } resolve(result) }) .catch(reject) }) } const film = (query) => { return new Promise((resolve, reject) => { axios.get(`http://167.99.31.48/?s=${query}`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#content > div > div.los').each(function (a, b) { $(b).find('article').each(function (c, d) { const judul = $(d).find('div > a > div.addinfox > header > h2').text() const quality = $(d).find('div > a > div > div > span').text() const type = $(d).find('div > a > div.addinfox > div > i.type').text() const upload = $(d).find('div > a > div.addinfox > div > span').text() const link = $(d).find('div > a').attr('href'); const thumb = $(d).find('div > a > div > img').attr('src'); const result = { status: 200, author: "#𝑿𝑭𝒂𝒓", judul: judul, quality: quality, type: type, upload: upload, link: link, thumb: thumb, }; hasil.push(result); }); }); resolve(hasil) }) .catch(reject) }) } const anime = (query) => { return new Promise((resolve, reject) => { axios.get(`https://www.anime-planet.com/anime/all?name=${query}`) .then(({ data }) => { const hasil = [] const $ = cheerio.load(data) $('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", judul: $(b).find('> a > h3').text(), link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'), thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src') }; hasil.push(result); }); resolve(hasil) }) .catch(reject) }) } const manga = (query) => { return new Promise((resolve, reject) => { axios.get(`https://www.anime-planet.com/manga/all?name=${query}`) .then(({ data }) => { const hasil = [] const $ = cheerio.load(data) $('#siteContainer > ul.cardDeck.cardGrid > li ').each(function (a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", judul: $(b).find('> a > h3').text(), link: 'https://www.anime-planet.com' + $(b).find('> a').attr('href'), thumbnail: 'https://www.anime-planet.com' + $(b).find('> a > div.crop > img').attr('src') }; hasil.push(result); }); resolve(hasil) }) .catch(reject) }) } const webtoon = (query) => { return new Promise((resolve, reject) => { axios.get(`https://www.webtoons.com/id/search?keyword=${query}`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#content > div.card_wrap.search._searchResult > ul > li ').each(function(a, b) { result = { status: 200, author: author, judul: $(b).find('> a > div > p.subj').text(), like: $(b).find('> a > div > p.grade_area > em').text(), creator: $(b).find('> a > div > p.author').text(), genre: $(b).find('> a > span').text(), thumbnail: $(b).find('> a > img').attr('src'), url: 'https://www.webtoons.com' + $(b).find('> a').attr('href') } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const character = (query) => { return new Promise((resolve, reject) => { axios.get(`https://www.anime-planet.com/characters/all?name=${query}`) .then(({ data }) => { const hasil = [] const $ = cheerio.load(data) $('#siteContainer > table > tbody > tr').each(function (a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", character: $(b).find('> td.tableCharInfo > a').text(), link: 'https://www.anime-planet.com' + $(b).find('> td.tableCharInfo > a').attr('href'), thumbnail: $(b).find('> td.tableAvatar > a > img').attr('src').startsWith('https://') ? $(b).find('> td.tableAvatar > a > img').attr('src') : 'https://www.anime.planet.com' + $(b).find('> td.tableAvatar > a > img').attr('src') }; hasil.push(result); }); resolve(hasil) }) .catch(reject) }) } const jadwalbola = () => { return new Promise((resolve, reject) => { axios.get('https://m.bola.net/jadwal_televisi/') .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#main_mid_headline_sub_topic').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", jadwal: $(b).find(' > div.main_mid_headline_topic > div > a').text(), tanggal: $(b).find(' > div.main_mid_headline_topic_grouped_time_list').text().split('\n')[1].split(' ')[1], jam: $(b).find(' > div.main_mid_headline_topic > span').text(), url: $(b).find(' > div.main_mid_headline_topic > div > a').attr('href'), thumb: $(b).find(' > div.main_mid_headline_topic > img').attr('src') } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const jadwaltv = () => { return new Promise((resolve, reject) => { axios.get('http://www.dokitv.com/jadwal-acara-tv') .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#tabeljadwaltv > tbody > tr ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", acara: $(b).find('> td:nth-child(2)').text(), channel: $(b).find('> td > a').text(), jam: $(b).find('> td.jfx').text(), source: $(b).find('> td > a').attr('href') } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const jadwalsholat = (query) => { return new Promise((resolve, reject) => { axios.get(`https://umrotix.com/jadwal-sholat/${query}`) .then(({ data }) => { const $ = cheerio.load(data) $('body > div > div.main-wrapper.scrollspy-action > div:nth-child(3) ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", tanggal: $(b).find('> div:nth-child(2)').text(), imsyak: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(1) > p:nth-child(2)').text(), subuh: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(2) > p:nth-child(2)').text(), dzuhur: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(3) > p:nth-child(2)').text(), ashar: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(4) > p:nth-child(2)').text(), maghrib: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(5) > p:nth-child(2)').text(), isya: $(b).find('> div.panel.daily > div > div > div > div > div:nth-child(6) > p:nth-child(2)').text() } resolve(result) }) }) .catch(reject) }) } const drakor = (query) => { return new Promise((resolve, reject) => { axios.get(`https://drakorasia.blog//?s=${query}&post_type=post`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#post > div ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", judul: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').text().trim(), years: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.category.text-gray.font-normal.text-white.text-xs.truncate > a').text(), genre: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > div.genrenya.text-center.text-white.text-opacity-75.text-xs.mt-1').text().trim(), thumbnail: $(b).find('> div.thumbnail > a > img').attr('src'), url: $(b).find('> div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a').attr('href') } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const listsurah = () => { return new Promise((resolve, reject) => { axios.get('https://litequran.net/') .then(({ data }) => { const $ = cheerio.load(data) let listsurah = [] $('body > main > section > ol > li > a').each(function(a, b) { listsurah.push($(b).text()) }) result = { status: 200, author: "#𝑿𝑭𝒂𝒓", listsurah: listsurah } resolve(result) }).catch(reject) }) } const surah = (query) => { return new Promise((resolve, reject) => { axios.get(`https://litequran.net/${query}`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = [] $('body > main > article > ol > li').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", arab: $(b).find('> span.ayat').text(), latin: $(b).find('> span.bacaan').text(), translate: $(b).find('> span.arti').text() } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const tafsirsurah = (query) => { return new Promise((resolve, reject) => { axios.get(`https://tafsirq.com/topik/${query}`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = [] $('body > div:nth-child(4) > div > div.col-md-6 > div ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", surah: $(b).find('> div.panel-heading.panel-choco > div > div > a').text(), tafsir: $(b).find('> div.panel-body.excerpt').text().trim(), type: $(b).find('> div.panel-heading.panel-choco > div > div > span').text(), source: $(b).find('> div.panel-heading.panel-choco > div > div > a').attr('href') } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const kompas = () => { return new Promise((resolve, reject) => { axios.get(`https://news.kompas.com/`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('body > div > div.container.clearfix > div:nth-child(3) > div.col-bs10-7 > div:nth-child(3) > div.latest.ga--latest.mt2.clearfix > div > div ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", berita: $(b).find('> div > div.article__box > h3').text(), upload_time: $(b).find('> div > div.article__box > div.article__date').text(), type_berita: $(b).find('> div > div.article__boxsubtitle > h2').text(), link: $(b).find('> div > div.article__box > h3 > a').attr('href'), thumbnail: $(b).find('> div > div.article__asset > a > img').attr('data-src'), info_berita: $(b).find('> div > div.article__box > div.article__lead').text() } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } const inews = () => { return new Promise((resolve, reject) => { axios.get(`https://www.inews.id/news`) .then(({ data }) => { const $ = cheerio.load(data) const hasil = []; $('#news-list > li ').each(function(a, b) { result = { status: 200, author: "#𝑿𝑭𝒂𝒓", berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > h3').text().trim(), upload_time: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > div.date.margin-10px-left').text().trim().split('|')[0], link: $(b).find('> a').attr('href'), thumbnail: $(b).find('> a > div > div > div.float-left.width-130px.position-absolute > img').attr('data-original'), info_berita: $(b).find('> a > div > div > div.float-left.width-400px.margin-130px-left > p').text() } hasil.push(result) }) resolve(hasil) }) .catch(reject) }) } function youtube(link){ return new Promise((resolve, reject) => { const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/ if (ytIdRegex.test(link)) { let url = ytIdRegex.exec(link) let config = { 'url': 'https://www.youtube.be/' + url, 'q_auto': 0, 'ajax': 1 } let headerss = { "sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"', "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "Cookie": 'PHPSESSID=6jo2ggb63g5mjvgj45f612ogt7; _ga=GA1.2.405896420.1625200423; _gid=GA1.2.2135261581.1625200423; _PN_SBSCRBR_FALLBACK_DENIED=1625200785624; MarketGidStorage={"0":{},"C702514":{"page":5,"time":1625200846733}}' } axios('https://www.y2mate.com/mates/en68/analyze/ajax',{ method: 'POST', data: new URLSearchParams(Object.entries(config)), headers: headerss }) .then(({ data }) => { const $ = cheerio.load(data.result) let img = $('div.thumbnail.cover > a > img').attr('src'); let title = $('div.thumbnail.cover > div > b').text(); let size = $('#mp4 > table > tbody > tr:nth-child(3) > td:nth-child(2)').text() let sizeN = size.replace(" MB", '') let size_mp3 = $('#audio > table > tbody > tr:nth-child(1) > td:nth-child(2)').text() let sizeNMp3 = size_mp3.replace(" MB", '') let id = /var k__id = "(.*?)"/.exec(data.result)[1] let configs = { type: 'youtube', _id: id, v_id: url[1], ajax: '1', token: '', ftype: 'mp4', fquality: 480 } axios('https://www.y2mate.com/mates/en68/convert',{ method: 'POST', data: new URLSearchParams(Object.entries(configs)), headers: headerss }) .then(({data}) => { const $ = cheerio.load(data.result) let link = $('div > a').attr('href') let configss = { type: 'youtube', _id: id, v_id: url[1], ajax: '1', token: '', ftype: 'mp3', fquality: 128 } axios('https://www.y2mate.com/mates/en68/convert',{ method: 'POST', data: new URLSearchParams(Object.entries(configss)), headers: headerss }) .then(({ data }) => { const $ = cheerio.load(data.result) let audio = $('div > a').attr('href') resolve({ id: url[1], title: title, size: size, sizeN: sizeN, quality: '480p', thumb: img, link: link, size_mp3: size_mp3, sizeNMp3: sizeNMp3, mp3: audio }) }) }) }) .catch(reject) }else reject('link invalid') }) } function quotes(input) { return new Promise((resolve, reject) => { fetch('https://jagokata.com/kata-bijak/kata-' + input.replace(/\s/g, '_') + '.html?page=1') .then(res => res.text()) .then(res => { const $ = cheerio.load(res) data = [] $('div[id="main"]').find('ul[id="citatenrijen"] > li').each(function (index, element) { x = $(this).find('div[class="citatenlijst-auteur"] > a').text().trim() y = $(this).find('span[class="auteur-beschrijving"]').text().trim() z = $(element).find('q[class="fbquote"]').text().trim() data.push({ author: x, bio: y, quote: z }) }) data.splice(2, 1) if (data.length == 0) return resolve({ creator: 'stikerin', status: false }) resolve({ creator: 'stikerin', status: true, data }) }).catch(reject) }) } function joox(query) { return new Promise((resolve, reject) => { const time = Math.floor(new Date() / 1000) axios.get('http://api.joox.com/web-fcgi-bin//web_search?lang=id&country=id&type=0&search_input=' + query + '&pn=1&sin=0&ein=29&_=' + time) .then(({ data }) => { let result = [] let hasil = [] let promoses = [] let ids = [] data.itemlist.forEach(result => { ids.push(result.songid) }); for (let i = 0; i < data.itemlist.length; i++) { const get = 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=' + ids[i] promoses.push( axios.get(get, { headers: { Cookie: 'wmid=142420656; user_type=1; country=id; session_key=2a5d97d05dc8fe238150184eaf3519ad;' } }) .then(({ data }) => { const res = JSON.parse(data.replace('MusicInfoCallback(', '').replace('\n)', '')) hasil.push({ lagu: res.msong, album: res.malbum, penyanyi: res.msinger, publish: res.public_time, img: res.imgSrc, mp3: res.mp3Url }) Promise.all(promoses).then(() => resolve({ creator: "ariffb", status: true, data: hasil, })) }).catch(reject) ) } }).catch(reject) }) } function tiktok(url) { return new Promise(async (resolve, reject) => { axios.get('https://ttdownloader.com/', { headers: { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061" } }) .then(({ data }) => { const $ = cheerio.load(data) let token = $('#token').attr('value') let config = { 'url': url, 'format': '', 'token': token } axios('https://ttdownloader.com/req/', { method: 'POST', data: new URLSearchParams(Object.entries(config)), headers: { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061" } }) .then(({ data }) => { const $ = cheerio.load(data) resolve({ nowm: $('div:nth-child(2) > div.download > a').attr('href'), wm: $('div:nth-child(3) > div.download > a').attr('href'), audio: $('div:nth-child(4) > div.download > a').attr('href') }) }) }) .catch(reject) }) } function twitter(url) { return new Promise((resolve, reject) => { let params = new URLSearchParams() params.append('URL', url) fetch('https://twdown.net/download.php', { method: 'POST', body: params }) .then(res => res.text()) .then(res => { const $ = cheerio.load(res); data = [] $('div.container').find('tbody > tr > td').each(function (index, element) { x = $(this).find('a').attr('href') if (x !== '#') { if (typeof x !== 'undefined') { data.push({ url: x }) } } }) if (data.length == 0) return resolve({ status: false }) resolve({ status: true, data }) }).catch(reject) }) } function twitter2(link){ return new Promise((resolve, reject) => { let config = { 'URL': link } axios.post('https://twdown.net/download.php',qs.stringify(config),{ headers: { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", "sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"', "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "_ga=GA1.2.1388798541.1625064838; _gid=GA1.2.1351476739.1625064838; __gads=ID=7a60905ab10b2596-229566750eca0064:T=1625064837:RT=1625064837:S=ALNI_Mbg3GGC2b3oBVCUJt9UImup-j20Iw; _gat=1" } }) .then(({ data }) => { const $ = cheerio.load(data) resolve({ desc: $('div:nth-child(1) > div:nth-child(2) > p').text().trim(), thumb: $('div:nth-child(1) > img').attr('src'), HD: $('tbody > tr:nth-child(1) > td:nth-child(4) > a').attr('href'), SD: $('tr:nth-child(2) > td:nth-child(4) > a').attr('href'), audio: 'https://twdown.net/' + $('tr:nth-child(4) > td:nth-child(4) > a').attr('href') }) }) .catch(reject) }) } function igdl2(url) { return new Promise(async (resolve, reject) => { axios.request({ url: 'https://www.instagramsave.com/download-instagram-videos.php', method: 'GET', headers: { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg" } }) .then(({ data }) => { const $ = cheerio.load(data) const token = $('#token').attr('value') let config = { headers: { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', "sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"', "cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", }, data: { 'url': url, 'action': 'post', 'token': token } } axios.post('https://www.instagramsave.com/system/action.php', qs.stringify(config.data), { headers: config.headers }) .then(({ data }) => { resolve(data.medias) }) }) .catch(reject) }) } function igdl(url_media) { return new Promise((resolve,reject)=>{ url_media = url_media.replace("reel", "p") var url = "https://igram.io/i/" const requestBody = { url: url_media.replace("reel", "p"), lang_code: "en" } const config = { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.75', 'x-requested-with': ' XMLHttpRequest', 'origin': ' https://igram.io', 'referer': ' https://igram.io/en/dl/', 'sec-fetch-dest': ' empty', 'sec-fetch-mode': ' cors', 'sec-fetch-site': ' same-origin', 'Content-Type': 'application/x-www-form-urlencoded', 'Cookie': '__cfduid=d4c2ddc2229a4d74c28b6ba25cdcd2a181618175605' }, } axios.post(url, qs.stringify(requestBody), config).then(result => { let $ = cheerio.load(result.data), ig = [] //Obter todos os links de videos da pagina carregada $('[data-mediatype=Video]').each((i, element) => { let cheerioElement = $(element) ig.push(cheerioElement.attr("href")) }) //Obter todos os links de imagem da pagina carregada $('div > div.bg-white.border.rounded-sm.max-w-md > img').each((i, element) => { let cheerioElement = $(element) ig.push(cheerioElement.attr("src")) }) resolve({ results_number : ig.length, url_list: ig }) }).catch(err=>{ console.log(err.response) reject(err) }) }) } function igstalk(username){ return new Promise((resolve,reject) => { axios.get('https://www.instagram.com/'+ username +'/?__a=1',{ method: 'GET', headers: { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", "cookie": "mid=XBXl1AALAAEbFoAEfNjZlMMG9dwX; ig_did=91E66A48-5AA2-445D-BFE6-84DC4456DE8F; fbm_124024574287414=base_domain=.instagram.com; ig_nrcb=1; shbid=\"12737\0544008624962\0541656157971:01f72a5102dc07af6845adf923ca70eb86e81ab95fa9dbfdaf157c9eef0e82fd1f10fe23\"; shbts=\"1624621971\0544008624962\0541656157971:01f74841fba8e77a0066b47ea891dec8fba6fdf9216c0816f9fb3532292f769828800ae2\"; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; fbsr_124024574287414=86D8femzH4_KFW4hd3Z6XFdowU6lG-uXsXRQDNl44VM.eyJ1c2VyX2lkIjoiMTAwMDA0Njc2MDc4Nzg5IiwiY29kZSI6IkFRQngzXzVOejdwVnBwby1LRGRUdEYxUFlzcUdDQXJjcmJfb05HaWFvYkNvOGtLN2paam50bHpvMTNOakFnTzVKOHQ5M0V3U3dvNkRtZ0RiY1l1Z3dQSTIybnExOUxLd3lpZTVfZll0bkNXZXBuM1hoYWFLX0w2R0pZaUpzaDBOTDBhb3pmTVBkRTVQRC12X3FnbUgxLXZYdGVmcHhfaFU0aUZNZVMxNHhFUk5OblJyMmxYTUpDa2RFYTdISXNCR2swdHhaaGF0NUt4UDR3cWZTamRwcVFfQ19sa1RUek5fU0taUTYtMjlzTkdnLUVWb3oxMUZWc3Q2OEx2ZnlIY0V0eFp0ZUxacXpiWmh6MzZrVl83VmFGd0FqVnVkTGFQN2VzT3ZRcmlTQ2pLUE5XbVcyNWhudzIzejJBSnVURW00YWR1cmN6a3ZLWU1icTd2SnN0SVdJV09RIiwib2F1dGhfdG9rZW4iOiJFQUFCd3pMaXhuallCQUJBZmJuQ3haQzZMd3h4MDFJV2MyZ3dsQ3k3Qmp0b05UNUY0WDY2NHBrUzRQeERNVXRsdmhWWkI3SXE0MGsyZ2hJQm55RHRPcW5iVjlPbUNiWGhyTFBaQUhBQjFzVFpBdHF6RFEzVTROUkhOU1V6MFVXWkNtTEdLcDNNWDRoazVIOURLbERHN0QwUlhZNHY4dHBCdVNNYjN4dnBTRGtQcHdYRlBXVU82VCIsImFsZ29yaXRobSI6IkhNQUMtU0hBMjU2IiwiaXNzdWVkX2F0IjoxNjI0NjIxOTgxfQ; csrftoken=PpiPMEl0R2pAwThsw4NXynO6cVIXHZDo; ds_user_id=38316792800; sessionid=38316792800:rQj5Tr3g5zkg7b:4; rur=\"RVA\05438316792800\0541656158332:01f759cf624bef147397144805bb4c26f6c8b36a232e0f5738c570ee492f6b629f84f6e5\"" } }) .then(({ data }) => { const user = data.graphql.user let result = { message: 'By Hexagon', id: user.id, biography: user.biography, followers: user.edge_followed_by.count, following: user.edge_follow.count, fullName: user.full_name, highlightCount: user.highlight_reel_count, isBusinessAccount: user.is_business_account, isRecentUser: user.is_joined_recently, accountCategory: user.business_category_name, linkedFacebookPage: user.connected_fb_page, isPrivate: user.is_private, isVerified: user.is_verified, profilePicHD: user.profile_pic_url_hd, username: user.username, postsCount: user.edge_owner_to_timeline_media.count } resolve(result) }) .catch(reject) }) } function igstory(username) { return new Promise(async (resolve, reject) => { axios.request({ url: 'https://www.instagramsave.com/instagram-story-downloader.php', method: 'GET', headers: { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", "cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg" } }) .then(({