-
Notifications
You must be signed in to change notification settings - Fork 861
Description
Hi Team,
link is generated against this video (https://youtube.com/shorts/6QulIvGWHJ0?si=EbogTUADbI69Gudi)
But when i try to access it on browser or using my react native library it is not accessible. getting:
"Access to rr2---sn-jtcxg-3ip6.googlevideo.com was denied. You don't have authorization to view this page.
HTTP ERROR 403"
my code is:
exports.getVideoInfo = async (req, res) => { try { const videoUrl = req.query.url; // Get video URL from request query parameter if (!videoUrl) { return res.status(400).json({ message: "Missing video URL" }); } const info = await ytdl.getInfo(videoUrl); // Extract relevant information for the frontend const availableFormats = info.formats.map((format) => ({ itag: format.itag, mimeType: format.mimeType, container: format.container, audioBitrate: format.audioBitrate, videoBitrate: format.videoBitrate, height: format.height, width: format.width, approxSize: format.approxSize, })); return res .status(200) .json({ availableFormats, videoTitle: info.videoDetails.title }); } catch (error) { console.error(error); return res .status(500) .json({ message: "Error fetching video information" }); } };