const axios = require('axios'); async function onedl(url) { try { if (!url.includes('https://')) throw new Error('Invalid url.'); const { data } = await axios.post('https://onedownloader.net/search', new URLSearchParams({ query: encodeURIComponent(url) }).toString(), { headers: { 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', origin: 'https://onedownloader.net', referer: 'https://onedownloader.net/', 'user-agent': 'Mozilla/5.0 (Linux; Android 15; SM-F958 Build/AP3A.240905.015) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.86 Mobile Safari/537.36', 'x-requested-with': 'XMLHttpRequest' } }); return data.data; } catch (error) { throw new Error(error.message); } }; // Usage: onedl('https://x.com/taro0666/status/1987679862283542679?s=20').then(console.log);