distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
289 stars 50 forks source link

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

Closed MohamedAdany closed 1 month ago

MohamedAdany commented 3 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 3 months ago

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

MohamedAdany commented 3 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 3 months ago

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

Jk950305 commented 3 months ago

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

yourshaxzod commented 3 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?

ybd-project commented 3 months ago

@ybd-project/ytdl-core I have now released ytdl-core with the ability to specify poToken and visitorData. The iOS and Android players are experiencing bot errors, but we have been able to work around this by using the Web Creator player. These issues are being improved, so please wait. We are looking forward to receiving reports of issues.