distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
268 stars 48 forks source link

This video is unavailable #29

Closed Lampropoulosss closed 3 months ago

Lampropoulosss commented 3 months ago

I am simply starting node in ssh and I type these commands one by one:

  1. const ytdl = require("@distube/ytdl-core");
  2. await ytdl.getBasicInfo("http://www.youtube.com/watch?v=aqz-KE-bpKQ")

Returns:

Uncaught UnrecoverableError: This video is unavailable at exports.playError (/root/project/node_modules/@distube/ytdl-core/lib/utils.js:164:12) at exports.getBasicInfo (/root/project/node_modules/@distube/ytdl-core/lib/info.js:52:25) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Happens for every video.

Environment

skick1234 commented 3 months ago

Provide youtube cookies (alt account) to prevent this. I don't really know why it happens but YouTube may block your ip and require sign in (like Sign in to confirm you're not a bot error)