distubejs / ytdl-core

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

Sign in to confirm you’re not a bot #112

Closed RoyLizhiyu closed 1 month ago

RoyLizhiyu commented 1 month ago

Describe the bug

I'm building a Nextjs App. ytdl works on my local machine. But when it's deployed to Vercel or Netlify I got Sign in to confirm you’re not a bot Error. I've tried using Proxy and Cookies from my youtube account, both didn't work. Waiting for a solution.

Debug File

image

Environment

Jppblue commented 1 month ago

Anybody fixed this? I'm having this exact error when launching to production, but not in Localhost:3000

BitcircuitEU commented 1 month ago

Bump

Issue still persists.

It doesn't matter in which format the cookies are entered. Used the Option

const cookies = [
  { name: "cookie1", value: "COOKIE1_HERE" },
  { name: "cookie2", value: "COOKIE2_HERE" },
];

which is documented in Readme but logs tell me its old format

and also the option

const COOKIE = 'a=1; b=2';
stream = ytdl(video, {
                highWaterMark: 1 << 25,
                quality: 'highestaudio',
                requestOptions: {
                    headers: {
                      cookie: COOKIE
                    },
                  }
            }); 
Maher-Zubair commented 1 month ago

Anybody fixed this? I'm having this exact error when launching to production, but not in Localhost:3000

same issue

ghost commented 1 month ago

Try this. (I fork @distube/ytdl-core to solve various problems. Also, usage is quite different from this one.) https://github.com/ybd-project-ver1/ytdl-core

RoyLizhiyu commented 1 month ago

Try this. (I fork @distube/ytdl-core to solve various problems. Also, usage is quite different from this one.) https://github.com/ybd-project-ver1/ytdl-core

I will try later! Thank you