Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Help #268

@tonykx

Description

@tonykx

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions