Sxyz
Sxyz
February 19, 2025 at 09:34 AM
💥 YOUTUBE DOWNLOADER ( YTDL ); 💻 Base : https://r2hshop.ca/ 👨‍💻 Author : SxyzTheGreat 📝 Request By: @KayzuMD 🍀 Request: [email protected] ☕ Code : import axios from "axios"; function extractYouTubeID(url) { const regex = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]+)/; const match = url.match(regex); return match ? match[1] : null; } const ytdl = { getInfo: async (url)=> { let idYt = extractYouTubeID(url); let { data } = await axios.get(`https://c01-h01.cdnframe.com/api/v4/info/${idYt}`); return JSON.stringify(data, null, 2) }, convert: async (token) => { let payloD = { "token": token } let { data: djjs } = await axios.post("https://c01-h01.cdnframe.com/api/v4/convert", payloD); return JSON.stringify(djjs, null, 2) }, download: async (jobId) => { let { data } = await axios.get(`https://c01-h01.cdnframe.com/api/v4/status/${jobId}`); return JSON.stringify(data, null, 2) } } export default ytdl;
❤️ 2

Comments