You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 16, 2025. It is now read-only.
I looked in the issues for the cause of this error but I didn't find the solution (login error). You can check if there is something wrong with the function.
case 'p':{
const ytdl = require("@distube/ytdl-core");
const cookies = JSON.parse(fs.readFileSync("cookies.json", "utf8"));
const agent = ytdl.createAgent(cookies);
async function baixarInfo(videoURL) {
try {
const info = await ytdl.getInfo(videoURL, { agent });
console.log("Título:", info.videoDetails.title);
} catch (error) {
console.error("Erro ao buscar info:", error);
}
}
I looked in the issues for the cause of this error but I didn't find the solution (login error). You can check if there is something wrong with the function.
case 'p':{
const ytdl = require("@distube/ytdl-core");
const cookies = JSON.parse(fs.readFileSync("cookies.json", "utf8"));
const agent = ytdl.createAgent(cookies);
async function baixarInfo(videoURL) {
try {
const info = await ytdl.getInfo(videoURL, { agent });
console.log("Título:", info.videoDetails.title);
} catch (error) {
console.error("Erro ao buscar info:", error);
}
}
baixarInfo("https://youtu.be/93TXfW3MT4o?si=DaKiWv3gJm1yxuOy");
break }