UNPKG

zerotwomd

Version:

Multi device wa bot created by Team Zero Two.

33 lines (30 loc) 1.42 kB
const cheerio = require('cheerio') const axios = require('axios') // Downloader async function aiovideodl(link) { 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=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653" } }).then((src) => { let a = cheerio.load(src.data) let token = a('#token').attr('value') axios({ url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/', method: 'POST', 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=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653" }, data: new URLSearchParams(Object.entries({ 'url': link, 'token': token })) }).then(({ data }) => { resolve(data) }) }) }) } module.exports = { aiovideodl }