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.

getInfo bug #281

Description

@tmquan2508

Describe the bug and how to reproduce it

Code:
const fs = require('node:fs');
const ytdl = require("@distube/ytdl-core");

const videoUrl = 'https://www.youtube.com/watch?v=Vq13SuZFV_0';

(async () => {
    const agent = ytdl.createAgent(JSON.parse(fs.readFileSync("cookies.json", 'utf8')));

    const options = { agent };

    try {
        await ytdl.getBasicInfo(videoUrl, options);
        console.log('✅ getBasicInfo');
    } catch (err) {
        console.error(`❌ getBasicInfo, ${err}`);
    }

    try {
        await ytdl.getInfo(videoUrl, options);
        console.log('✅ getInfo');
    } catch (err) {
        console.error(`❌ getInfo, ${err}`);
    }
})();

getInfo is still working with video that don't need to sign to confirm age
I ensure the problem is not in cookies.json, it have all SID, HSID, SSID, LOGIN_INFO, CONSENT, I copy it with EditThisCookie (V3)

Environment

  • @distube/ytdl-core version: 4.16.12
  • Node.js version: v20.19.2
  • Operating system: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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