UNPKG

@sxyzdev/scrapers

Version:

Simple Module All In One Scrapers Untuk Memenuhi Kebutuhan Pengumpulan Data Kamu Dari 50+ Website!

34 lines (28 loc) 679 B
import axios from "axios"; import * as cheerio from "cheerio"; import FormData from "form-data"; const Aio = { getTokens: async () => { let { data: tkns } = await axios.get("https://steptodown.com/"); let $ = cheerio.load(tkns); return $("#token").val(); }, request: async (urls) => { let tkns = await Aio.getTokens(); let d = new FormData(); d.append("url", urls); d.append("token", tkns); let headers = { headers: { ...d.getHeaders(), }, }; let { data: tktk } = await axios.post( "https://steptodown.com/wp-json/aio-dl/video-data/", d, headers ); return tktk; }, }; export Aio;