zimbot-v4
Version:
Multi device wa bot created by Zim Bot Inc.
1,117 lines (1,075 loc) • 73.8 kB
JavaScript
// ⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈⧈
//▮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 { JSDOM } = require('jsdom')
const FormData = require('form-data')
const cheerio = require('cheerio')
const fetch = require('node-fetch')
const axios = require('axios')
const qs = require('qs')
module.exports = {
aiovideodl,
filmapik,
ssweb,
hoax,
sfilesearch,
happymod,
servermc,
gempa,
mediafire,
telegraph,
ghstalk,
komiku,
lirik,
covid,
otaku,
shoppe,
inews,
jalantikus,
kompasnews,
tribunnews,
tafsirsurah,
surah,
listsurah,
stickersearch,
drakor,
mangatoons,
webtoons,
wattpaduser,
wattpad,
film,
pinterest,
jadwalsholat,
jadwaltv,
jadwalbola,
character,
manga,
anime,
soundcloud,
xnxxsearch,
xnxxdl,
herodetails,
herolist,
playstore,
tiktokporn,
hentai,
quotesanime,
wallpaper,
wikimedia,
facebook,
facebook2,
_token,
quotes,
igdl,
igstory,
igstory2,
snaptik,
tiktok,
twitter,
joox,
pin
}
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: '@rasel.ganz', status: false })
resolve({ creator: '@rasel.ganz', 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: "@rasel.ganz",
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)
})
}
async function snaptik(url) {
try {
let results = {}
if (/v[tm]\.tiktok\.com/g.test(url)) {
let res = await axios.get(url)
url = res.request.res.responseUrl
}
let key = await axios.get(`https://api.snaptik.site/video-key?video_url=${url}`)
key = JSON.parse(JSON.stringify(key.data, null, 2))
if (key.status !== 'success') throw key
let data = await axios.get(`https://api.snaptik.site/video-details-by-key?key=${key.data.key}`)
data = JSON.parse(JSON.stringify(data.data, null, 2))
if (data.status !== 'success') throw data
results = {
author: { ...data.data.author },
description: data.data.description,
video: {
with_watermark: `https://api.snaptik.site/download?key=${data.data.video.with_watermark}&type=video`,
no_watermark: `https://api.snaptik.site/download?key=${data.data.video.no_watermark}&type=video`,
no_watermark_raw: data.data.video.no_watermark_raw
},
music: `https://api.snaptik.site/download?key=${data.data.music}&type=music`
}
return results
} catch (e) {
throw `Maaf url tidak valid atau video private`
}
}
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 igdl(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 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(({ 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': 'https://www.instagram.com/' + username,
'action': 'story',
'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)
})
}
async function igstory2(username) {
let { data } = await axios.get(`https://www.instadownloader.org/data.php?username=${username}&t=${new Date * 1}`)
const $ = cheerio.load(data)
let results = []
$('body > center').each(function (i, el) {
results.push({
url: $(el).find('a.download-btn').attr('href'),
type: $(el).find('video').html() ? 'video' : 'image'
})
})
return results
}
function pin(url) {
return new Promise((resolve, reject) => {
function rand() {
return `${Math.floor(Math.random() * 1000000)}`
}
let params = new URLSearchParams()
params.append('url', url)
fetch('https://www.expertsphp.com/facebook-video-downloader.php', { method: 'POST', body: params })
.then(res => res.text())
.then(res => {
const $ = cheerio.load(res)
y = 'pinterest_' + rand() + '.mp4'
x = $('video').find('source').attr('src')
data = { file: y, url: x }
if (typeof x == 'undefined') return resolve({ status: false })
resolve({ status: true, data })
}).catch(reject)
})
}
let is = {
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",
}
}
function _token(host) {
return new Promise(async (resolve, reject) => {
axios.request({
url: host, 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 }) => {
let $ = cheerio.load(data)
let token = $('#token').attr('value')
resolve(token)
})
})
}
function facebook(url){
return new Promise((resolve,reject) => {
let config = {
'url': url
}
axios('https://www.getfvid.com/downloader',{
method: 'POST',
data: new URLSearchParams(Object.entries(config)),
headers: {
"content-type": "application/x-www-form-urlencoded",
"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.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss"
}
})
.then(async({ data }) => {
const $ = cheerio.load(data);
resolve({
video: $('div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'),
audio: $('div.col-md-4.btns-download > p:nth-child(3) > a').attr('href')
})
})
.catch(reject)
})
}
function facebook2(urls) {
return new Promise(async (resolve, reject) => {
const data = await axios({
url: 'https://downvideo.net/',
method: 'GET',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
}
})
const $ = cheerio.load(data.data)
const token = $('#token').attr('value')
const getPost = await axios({
url: 'https://downvideo.net/download.php',
method: 'POST',
headers: {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36',
"cookie": '_gid=GA1.2.1321544464.1633811193; _ga=GA1.2.1392580783.1633811193; __gads=ID=c73de99d7fa5c467-226981f63ecc00f1:T=1633811193:RT=1633811193:S=ALNI_MaC9fW2mqfT2hm7zODcNNffab1XLg'
},
data: new URLSearchParams(Object.entries({ 'URL': urls, 'token': token }))
})
const c = cheerio.load(getPost.data)
const hasil = {
author: c('div.row').find('div.col-md-12:nth-child(1)').text(),
title: c('div.row').find('div.col-md-12:nth-child(3) > p').text(),
thumb: c('div.row').find('div.col-md-12:nth-child(2) > img').attr('src'),
link_high: c('div.row').find('div.col-md-3 > a').eq(0).attr('href') || c('div.row').find('#sd > a').attr('href') || '',
link_normal: c('div.row').find('div.col-md-3 > a').eq(1).attr('href') || ''
}
resolve({ status: getPost.status, creator: '@rasel.ganz', hasil: hasil })
})
}
function wallpaper(title, page) {
return new Promise((resolve, reject) => {
axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${page}&q=${title}`)
.then(({ data }) => {
let $ = cheerio.load(data)
let hasil = []
$('div.grid-item').each(function (a, b) {
hasil.push({
title: $(b).find('div.info > a > h3').text(),
type: $(b).find('div.info > a:nth-child(2)').text(),
image: $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function wikimedia(title) {
return new Promise((resolve, reject) => {
axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`)
.then((res) => {
let $ = cheerio.load(res.data)
let hasil = []
$('.sdms-search-results__list-wrapper > div > a').each(function (a, b) {
hasil.push({
title: $(b).find('img').attr('alt'),
source: $(b).attr('href'),
image: $(b).find('img').attr('src') || $(b).find('img').attr('src')
})
})
resolve(hasil)
})
})
}
function tiktokporn() {
return new Promise((resolve, reject) => {
axios.get('https://tikporntok.com/?random=1')
.then((res) => {
const $ = cheerio.load(res.data)
const hasil = {}
hasil.title = $('article > h1').text()
hasil.source = $('article > div.video-wrapper.vxplayer').attr('data-post') || 'Web Not Response'
hasil.thumb = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-poster') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
hasil.desc = $('article > div.intro').text()
hasil.upload = $('article > div.single-pre-meta.ws.clearfix > time').text()
hasil.like = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(1) > span').text()
hasil.dislike = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(2) > span').text()
hasil.favorite = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(3) > span').text()
hasil.views = $('article > div.single-pre-meta.ws.clearfix > div > span:nth-child(4) > span').text()
hasil.tags = $('article > div.post-tags').text()
hasil.video = $('article > div.video-wrapper.vxplayer > div.vx_el').attr('src') || $('article > div.video-wrapper.vxplayer > div.vx_el').attr('data-src') || 'https://4.bp.blogspot.com/-hyMqjmQQq4o/W6al-Rk4IpI/AAAAAAAADJ4/m-lVBA_GC9Q5d4BIQg8ZO3fYmQQC3LqSACLcBGAs/s1600/404_not_found.png'
resolve(hasil)
})
})
}
function hentai() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 1153)
axios.get('https://sfmcompile.club/page/'+page)
.then((data) => {
const $ = cheerio.load(data.data)
const hasil = []
$('#primary > div > div > ul > li > article').each(function (a, b) {
hasil.push({
title: $(b).find('header > h2').text(),
link: $(b).find('header > h2 > a').attr('href'),
category: $(b).find('header > div.entry-before-title > span > span').text().replace('in ', ''),
share_count: $(b).find('header > div.entry-after-title > p > span.entry-shares').text(),
views_count: $(b).find('header > div.entry-after-title > p > span.entry-views').text(),
type: $(b).find('source').attr('type') || 'image/jpeg',
video_1: $(b).find('source').attr('src') || $(b).find('img').attr('data-src'),
video_2: $(b).find('video > a').attr('href') || ''
})
})
resolve(hasil)
})
})
}
function quotesanime() {
return new Promise((resolve, reject) => {
const page = Math.floor(Math.random() * 184)
axios.get('https://otakotaku.com/quote/feed/'+page)
.then(({ data }) => {
const $ = cheerio.load(data)
const hasil = []
$('div.kotodama-list').each(function(l, h) {
hasil.push({
link: $(h).find('a').attr('href'),
gambar: $(h).find('img').attr('data-src'),
karakter: $(h).find('div.char-name').text().trim(),
anime: $(h).find('div.anime-title').text().trim(),
episode: $(h).find('div.meta').text(),
up_at: $(h).find('small.meta').text(),
quotes: $(h).find('div.quote').text().trim()
})
})
resolve(hasil)
}).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 herolist() {
return new Promise((resolve, reject) => {
Axios.get('https://mobile-legends.fandom.com/wiki/Mobile_Legends:_Bang_Bang_Wiki')
.then(({ data }) => {
const $ = cheerio.load(data)
let data_hero = []
let url = []
$('div > div > span > span > a').get().map((result) => {
const name = decodeURIComponent($(result).attr('href').replace('/wiki/',''))
const urln = 'https://mobile-legends.fandom.com' + $(result).attr('href')
data_hero.push(name)
url.push(urln)
})
resolve({ status: 200, hero: data_hero })
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function herodetails(name) {
return new Promise((resolve, reject) => {
var splitStr = name.toLowerCase().split(' ');
for (var i = 0; i < splitStr.length; i++) {
splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1);
}
const que = splitStr.join(' ')
Axios.get('https://mobile-legends.fandom.com/wiki/' + que)
.then(({ data }) => {
const $ = cheerio.load(data)
let mw = []
let attrib = []
let skill = []
const name = $('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > table > tbody > tr > td > font > b').text()
$('.mw-headline').get().map((res) => {
const mwna = $(res).text()
mw.push(mwna)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td').get().map((rest) => {
const haz = $(rest).text().replace(/\n/g,'')
attrib.push(haz)
})
$('#mw-content-text > div > div > div > div > div > div > table > tbody > tr > td > div.progressbar-small.progressbar > div').get().map((rest) => {
skill.push($(rest).attr('style').replace('width:',''))
})
Axios.get('https://mobile-legends.fandom.com/wiki/' + que + '/Story')
.then(({ data }) => {
const $ = cheerio.load(data)
let pre = []
$('#mw-content-text > div > p').get().map((rest) => {
pre.push($(rest).text())
})
const story = pre.slice(3).join('\n')
const items = []
const character = []
$('#mw-content-text > div > aside > section > div').get().map((rest) => {
character.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
$('#mw-content-text > div > aside > div').get().map((rest) => {
items.push($(rest).text().replace(/\n\t\n\t\t/g, '').replace(/\n\t\n\t/g,'').replace(/\n/g,''))
})
const img = $('#mw-content-text > div > aside > figure > a').attr('href')
const chara = character.slice(0,2)
const result = {
status: 200,
hero_name: name + ` ( ${mw[0].replace('CV:',' CV:')} )`,
entrance_quotes: attrib[2].replace('Entrance Quotes','').replace('\n',''),
hero_feature: attrib[attrib.length - 1].replace('Hero Feature',''),
image: img,
items: items,
character: {
chara
},
attributes: {
movement_speed: attrib[12].replace('● Movement Speed',''),
physical_attack: attrib[13].replace('● Physical Attack',''),
magic_power: attrib[14].replace('● Magic Power',''),
attack_speed: attrib[15].replace('● Attack Speed',''),
physical_defense: attrib[16].replace('● Physical Defense',''),
magic_defense: attrib[17].replace('● Magic Defense',''),
basic_atk_crit_rate: attrib[18].replace('● Basic ATK Crit Rate',''),
hp: attrib[19].replace('● HP',''),
mana: attrib[20].replace('● Mana',''),
ability_crit_rate: attrib[21].replace('● Ability Crit Rate',''),
hp_regen: attrib[22].replace('● HP Regen',''),
mana_regen: attrib[23].replace('● Mana Regen','')
},
price: {
battle_point: mw[1].split('|')[0].replace(/ /g,''),
diamond: mw[1].split('|')[1].replace(/ /g,''),
hero_fragment: mw[1].split('|')[2] ? mw[1].split('|')[2].replace(/ /g,'') : 'none'
},
role: mw[2],
skill: {
durability: skill[0],
offense: skill[1],
skill_effects: skill[2],
difficulty: skill[3]
},
speciality: mw[3],
laning_recommendation: mw[4],
release_date: mw[5],
background_story: story
}
resolve(result)
}).catch((e) => reject({ status: 404, message: e.message }))
}).catch((e) => reject({ status: 404, message: e.message }))
})
}
function xnxxsearch(query) {
return new Promise((resolve, reject) => {
const baseurl = 'https://www.xnxx.com'
fetch(`${baseurl}/search/${query}/${Math.floor(Math.random() * 3) + 1}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
let title = [];
let url = [];
let desc = [];
let results = [];
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb').each(function(c, d) {
url.push(baseurl+$(d).find('a').attr('href').replace("/THUMBNUM/", "/"))
})
})
$('div.mozaique').each(function(a, b) {
$(b).find('div.thumb-under').each(function(c, d) {
desc.push($(d).find('p.metadata').text())
$(d).find('a').each(function(e,f) {
title.push($(f).attr('title'))
})
})
})
for (let i = 0; i < title.length; i++) {
results.push({
title: title[i],
info: desc[i],
link: url[i]
})
}
resolve({
code: 200,
status: true,
result: results
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
function xnxxdl(URL) {
return new Promise((resolve, reject) => {
fetch(`${URL}`, {method: 'get'})
.then(res => res.text())
.then(res => {
let $ = cheerio.load(res, {
xmlMode: false
});
const title = $('meta[property="og:title"]').attr('content');
const duration = $('meta[property="og:duration"]').attr('content');
const image = $('meta[property="og:image"]').attr('content');
const videoType = $('meta[property="og:video:type"]').attr('content');
const videoWidth = $('meta[property="og:video:width"]').attr('content');
const videoHeight = $('meta[property="og:video:height"]').attr('content');
const info = $('span.metadata').text();
const videoScript = $('#video-player-bg > script:nth-child(6)').html();
const files = {
low: (videoScript.match('html5player.setVideoUrlLow\\(\'(.*?)\'\\);') || [])[1],
high: videoScript.match('html5player.setVideoUrlHigh\\(\'(.*?)\'\\);' || [])[1],
HLS: videoScript.match('html5player.setVideoHLS\\(\'(.*?)\'\\);' || [])[1],
thumb: videoScript.match('html5player.setThumbUrl\\(\'(.*?)\'\\);' || [])[1],
thumb69: videoScript.match('html5player.setThumbUrl169\\(\'(.*?)\'\\);' || [])[1],
thumbSlide: videoScript.match('html5player.setThumbSlide\\(\'(.*?)\'\\);' || [])[1],
thumbSlideBig: videoScript.match('html5player.setThumbSlideBig\\(\'(.*?)\'\\);' || [])[1],
};
resolve({
status: 200,
result: {
title,
URL,
duration,
image,
videoType,
videoWidth,
videoHeight,
info,
files
}
})
})
.catch(err => reject({code: 503, status: false, result: err }))
})
}
async function soundcloud(url) {
return new Promise((resolve, reject) => {
axios({url: 'https://aiovideodl.ml/',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=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"}}).then((data) => {
let a = cheerio.load(data.data)
let token = a('#token').attr('value')
const options = {
method: 'POST',
url: `https://aiovideodl.ml/wp-json/aio-dl/video-data/`,
headers: {"content-type": "application/x-www-form-urlencoded; charset=UTF-8","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=3893d5f173e91261118a1d8b2dc985c3; _ga=GA1.2.792478743.1635388171;"
},
formData: {url: url,token: token}
};
request(options, async function(error, response, body) {
if (error) throw new Error(error)
res = JSON.parse(body)
res.status = 200
res.author = author
resolve(res);
});
})
})
}
function 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: '@rasel.ganz',
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)
})
}
function 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: '@rasel.ganz',
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)
})
}
function 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: '@rasel.ganz',
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)
})
}
function 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: '@rasel.ganz',
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)
})
}
function 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: '@rasel.ganz',
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)
})
}
function 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: '@rasel.ganz',
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)
})
}
function pinterest(query) {
return new Promise((resolve, reject) => {
axios(`https://www.pinterest.com/resource/BaseSearchResource/get/?source_url=%2Fsearch%2Fpins%2F%3Fq%3D${query}&data=%7B%22options%22%3A%7B%22isPrefetch%22%3Afalse%2C%22query%22%3A%22${query}%22%2C%22scope%22%3A%22pins%22%2C%22no_fetch_context_on_resource%22%3Afalse%7D%2C%22context%22%3A%7B%7D%7D&_=1619980301559`).then((data) => {
const random = data.data.resource_response.data.results[Math.floor(Math.random() * (data.data.resource_response.data.results.length))]
var result = [];
result = {
status: 200,
author: '@rasel.ganz',
url: random.images.orig.url
}
resolve(result)
}).catch(reject)
})
}
function 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: '@rasel.ganz',
judul: judul,
quality: quality,
type: type,
upload: upload,
link: link,
thumb: thumb,
};
hasil.push(result);
});
});
resolve(hasil)
})
.catch(reject)
})
}
function wattpad(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/search/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('div.story-card-data.hidden-xxs > div.story-info ').each(function(a, b) {
$('ul.list-group > li.list-group-item').each(function(c,d) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.title').text(),
dibaca: $(b).find('> ul > li:nth-child(1) > div.icon-container > div > span.stats-value').text(),
divote: $(b).find('> ul > li:nth-child(2) > div.icon-container > div > span.stats-value').text(),
bab: $(b).find('> ul > li:nth-child(3) > div.icon-container > div > span.stats-value').text(),
waktu: $(b).find('> ul > li:nth-child(4) > div.icon-container > div > span.stats-value').text(),
url:'https://www.wattpad.com' + $(d).find('a').attr('href'),
thumb: $(d).find('img').attr('src'),
description: $(b).find('> div.description').text().replace(/\n/g,'')
}
hasil.push(result)
})
})
resolve(hasil)
})
.catch(reject)
})
}
function wattpaduser(query) {
return new Promise((resolve, reject) => {
axios.get(`https://www.wattpad.com/user/${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
$('#app-container > div > header ').each(function(a, b) {
$('#profile-about > div > div ').each(function(c, d) {
result = {
status: 200,
author: '@rasel.ganz',
username: $(b).find('> div.badges > h1').text().trim(),
works: $(b).find('> div.row.header-metadata > div:nth-child(1) > p:nth-child(1)').text(),
reading_list: $(b).find('> div.row.header-metadata > div.col-xs-4.scroll-to-element > p:nth-child(1)').text(),
followers: $(b).find('> div.row.header-metadata > div.col-xs-4.on-followers > p.followers-count').text(),
joined: $(d).find('> ul > li.date.col-xs-12.col-sm-12 > span').text().trim().replace('Joined',''),
pp_picture: `https://img.wattpad.com/useravatar/${query}.128.851744.jpg`,
about: $(d).find('> div.description > pre').text() ? $(d).find('> div.description > pre').text() : 'Not found'
}
resolve(result)
})
})
})
.catch(reject)
})
}
function webtoons(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: '@rasel.ganz',
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)
})
}
function mangatoons(query) {
return new Promise((resolve, reject) => {
axios.get(`https://mangatoon.mobi/en/search?word=${query}`)
.then(({
data
}) => {
const $ = cheerio.load(data)
const hasil = [];
$('#page-content > div.search-page > div > div.comics-result > div.recommended-wrap > div > div ').each(function(a, b) {
result = {
status: 200,
author: '@rasel.ganz',
judul: $(b).find('> div.recommend-comics-title > span').text(),
genre: $(b).find('> div.comics-type > span').text().trim(),
link: 'https://mangatoon.mobi' + $(b).find('> a').attr('href'),
thumbnail: $(b).find('> a > div > img').attr('src')
}
hasil.push(result)
})
resolve(hasil)
})
.catch(reject)
})
}
function 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,