Update index.js
Browse files716 unmodified lines717718719720721720721722723724716 unmodified lines.get('/ytdl', async (req, res) => { try { let { url } = req.query; if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' });
//if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' }); if (!ytdl.validateURL(url)) return res.json({ message: 'Invalid URL' }); let data = await ytAPI(url) || {}; let videoID = ytdl.getVideoID(url); let dataInfo = await yts({ videoId: videoID }) || {};index.js+2-2