Closed Brainicism closed 4 weeks ago
You can use cookie for avoid it
private async initializeAgent() {
const cookiesPath = path.join(__dirname, '..', 'cookies.json');
const cookiesContent = fs.readFileSync(cookiesPath, 'utf8');
this.agent = ytdl.createAgent(JSON.parse(cookiesContent));
}
getAgent(): ytdl.Agent {
return this.agent;
}
You can use cookie for avoid it
private async initializeAgent() { const cookiesPath = path.join(__dirname, '..', 'cookies.json'); const cookiesContent = fs.readFileSync(cookiesPath, 'utf8'); this.agent = ytdl.createAgent(JSON.parse(cookiesContent)); } getAgent(): ytdl.Agent { return this.agent; }
Authentication doesn't always fix this issue. Main point of this issue is to figure out if unauthenticated requests can still be made to work. Risking Google account bans is not ideal
cookies.json
Don't worry , because file cookies.json set at in your back-end, not in client (front-end)
cookies.json
Don't worry , because file cookies.json set at in your back-end, not in client (front-end) you can check here : https://phuongmychi.vn/watch?v=ZTbKpBzL7hE
My point still stands.. and this is not relevant to the issue I created. The maintainer can decide whether this approach is viable
cookies.json
Don't worry , because file cookies.json set at in your back-end, not in client (front-end)
My point still stands.. and this is not relevant to the issue I created. The maintainer can decide whether this approach is viable
If you worry about that, you can create an youtube clone account for use cookie ^^, If you don't use cookie, you will be get error 403
Hey @Brainicism.
Does it work without cookies or proxies if I set po_token
etc as you say?
I have deployed my API to Vercel Function, but cookies do not work on such a server and I am using a proxy at this time.
(because I get a "Sign in to confirm you're not a bot" error)
Yes, it seems like an update is needed to be able to use po_tokens.
Yes, it seems like an update is needed to be able to use po_tokens.
How to retrieve the po_token
, is there any working version?
currently cookies doesn't work for live streams, seems like this is needed
Use Youtubei.js its working fine for me
Support for poToken is almost complete. Right now, the getBasicInfo function is not working due to a bot error, so I am fixing that. You can find it at @ybd-project/ytdl-core
@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.
Describe the bug
The other issue (https://github.com/distubejs/ytdl-core/issues/76) has been derailed with tech support questions.
po_token
andvisitor_data
is now required to bypass the bot confirmation screen. Details are documented inyt-dlp
orInvidious
' fix here: https://github.com/iv-org/invidious/pull/4789 && https://github.com/yt-dlp/yt-dlp/pull/10648.The
po_token
/visitor_data
can be generated using https://github.com/iv-org/youtube-trusted-session-generator, or presumably through inspecting your browser's HTTP request headers + cookies.How difficult would it be able to support this?
Debug File
Working request body
Working Headers
Environment
@distube/ytdl-core version: 4.14.4 Node.js version: v18.20.3 Operating system: Debian GNU/Linux 11