distubejs / ytdl-core

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

unable to get video info , UnrecoverableError: Sign in to confirm you’re not a bot #90

Closed MohamedAdany closed 3 days ago

MohamedAdany commented 2 months ago

Describe the bug

Error getting info for videoId: BR8MUdch1eA UnrecoverableError: Sign in to confirm you’re not a bot at exports.playError (/var/task/node_modules/@distube/ytdl-core/lib/utils.js:164:12) at exports.getBasicInfo (/var/task/node_modules/@distube/ytdl-core/lib/info.js:46:25) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Debug File

try {

         const  info = await ytdl.getInfo(videoId, { lang: clientLang });
           } catch (error) {
          console.error("Error getting info for videoId:", videoId, error);

Environment

miketuannguyen commented 2 months ago

Try using cookie https://github.com/distubejs/ytdl-core?tab=readme-ov-file#cookies-support. In my case, it works.

MohamedAdany commented 2 months ago

it worked for a single day, what to do when the cookie expires? i cant change it everyday, need a stable solution

omenocal commented 2 months ago

I tried using a proxy. Bought 3 proxy IPs, and after 3 days, they were all blocked too.

Jk950305 commented 2 months ago

having the same issue. Is it because Youtube blocks certain ip or something?

yourshaxzod commented 2 months ago

Try using cookie https://github.com/distubejs/ytdl-core?tab=readme-ov-file#cookies-support. In my case, it works.

How often are cookies updated?