Open Dmytro-Tihunov opened 2 months ago
as I understand we all faced with new problem that is "Sign in to confirm you’re not a bot" and that means youtube asks for captcha, is there anybody who find solution?
I'm also encountering a similar issue where access to https://rr4---sn-qxaeenlz.googlevideo.com is being denied with a status code 403. Does anyone have a solution for this?
@corwin-of-amber in production youtube will ban your ip and ask for captcha, in local it works also
Sorry @Dmytro-Tihunov, I have no idea what is this "production". I think your scenario is different from what most users are facing and reporting.
@corwin-of-amber in production it means deploy it and try to use, NOT LOCALLY )
I assume by "deploy" you mean some cloud service...? It's just that I cannot see how this library fits into such a scenario, but it is entirely possible that Google have more strict limitations on requests originating from such IPs.
I got around this by coping in the user-agent header from my browser. It seems to be blocking anything that doesn't smell browsery.
Guys it went down again
https://github.com/fent/node-ytdl-core/issues/1301#issuecomment-2262484536
Someone should probably merge the issues.
Just an observation, exploring this issue. On the YouTube website, videoplayback requests are now using POST method. And that GET method is forbidden on video files that are not shorts (<1 minute). The only GET requests that seem to work on longer videos files are 360p with audio and video combined.
Update: Regular downloading works up until 1 minute of video, thereafter, the servers require that requests have a post body that is an encoded uint8array comprising various metadata, config and cookie data, created by umpteen interlinked functions in base.js. Only the non-adaptive format streams and video streams less than one minute appear to work in HTML video tags.
It may be different on mobile devices.
no body share better patch code
Innertube info (/youtubei/v1/player) requests post a copy of the session's context client. Solved my problems (at least for now) by modifying the client from web to non-web for videos with duration greater than 1 minute. No more 403s on adaptive streams and resulting video streams will also play in HTML video tags.
The problem with this library is that it does not use the innertube API so I am not sure how you can modify the client type on a watch page. But the watch page does provide everything you need to make a subsequent innertube API request with modified client for streams that will work.
Innertube info (/youtubei/v1/player) requests post a copy of the session's context client. Solved my problems (at least for now) by modifying the client from web to non-web for videos with duration greater than 1 minute. No more 403s on adaptive streams and resulting video streams will also play in HTML video tags.
The problem with this library is that it does not use the innertube API so I am not sure how you can modify the client type on a watch page. But the watch page does provide everything you need to make a subsequent innertube API request with modified client for streams that will work.
My friend is using innnertube js API. Its working fine no more 403 error last few months. so you mean we move to innertube API @gatecrasher777
My friend is using innnertube js API. Its working fine no more 403 error last few months. so you mean we move to innertube API @gatecrasher777
Was thinking of doing a PR here, but I see that @distube/ytdl-core, a fork of this library already appears to do an ios innertube player request.
My friend is using innnertube js API. Its working fine no more 403 error last few months. so you mean we move to innertube API @gatecrasher777
Was thinking of doing a PR here, but I see that @distube/ytdl-core, a fork of this library already appears to do an ios innertube player request.
So what should we do now? Whats the next steps?
So what should we do now? Whats the next steps?
I don't know what your use case is, but while this issue persists I would suggest using https://github.com/distubejs/ytdl-core . It is also on NPM so it should be relatively easy to replace this library in your js/node projects.
There is a non-zero probability that YouTube will also put similar restrictions on non-web clients in the near future. If that happens I will try and crack the POST body encoding which happens with regular web client streaming on the YouTube website. But for now this non-web workaround is good enough for my projects.
do you have you email address i wanna sending you my API code and you can check it and let me know what we need to change?
do you have you email address i wanna sending you my API code and you can check it and let me know what we need to change?
AFAIK email is on my profile.
@navetacandra Ok thanks, btw will my youtube data api key will work here
It should work but DON'T restrict your API key so that it'll work for all platforms...
do you have you email address i wanna sending you my API code and you can check it and let me know what we need to change?
AFAIK email is on my profile.
Hello I send API code to your email address please check it and let me know
Guys it went down again
I'm facing same issue, @distube isn't working properly... I'm still receiving 403 page instead
So what should we do now? Whats the next steps?
I don't know what your use case is, but while this issue persists I would suggest using https://github.com/distubejs/ytdl-core . It is also on NPM so it should be relatively easy to replace this library in your js/node projects.
There is a non-zero probability that YouTube will also put similar restrictions on non-web clients in the near future. If that happens I will try and crack the POST body encoding which happens with regular web client streaming on the YouTube website. But for now this non-web workaround is good enough for my projects.
Please, check it. It didn't work few hours ago
Please, check it. It didn't work few hours ago
Downloaded latest version of @Distube/ytdl-core
Ran
const fs = require('fs');
const ytdl = require('./lib/index.js');
ytdl('http://www.youtube.com/watch?v=4jnaYhnmYlo')
.pipe(fs.createWriteStream('video.mp4'));
No errors. Got
2024/08/07 14:10 191 108 392 video.mp4
Ran a similar test in #1301 with this original project (after replacing the extractNCode function) and it downloaded at 360p with sound.
@Distube downloaded a much higher quality video (1080p), but without sound, so clearly the adaptive streams are working because of it using a non-web client call to the innertube API.
Please, check it. It didn't work few hours ago
Downloaded latest version of @Distube/ytdl-core
Ran
const fs = require('fs'); const ytdl = require('./lib/index.js'); ytdl('http://www.youtube.com/watch?v=4jnaYhnmYlo') .pipe(fs.createWriteStream('video.mp4'));
No errors. Got
2024/08/07 14:10 191 108 392 video.mp4
Ran a similar test in #1301 with this original project (after replacing the extractNCode function) and it downloaded at 360p with sound.
@Distube downloaded a much higher quality video (1080p), but without sound, so clearly the adaptive streams are working because of it using a non-web client call to the innertube API.
I can verify, @distube/ytdl-core works without any issues.
@distube is not working and no code is working
@Distube is not working and no code is working
@Distube is not working and no code is working
See distubejs#76
Hello please share your email I wanna send you my API code and you add the cookie code then I will add the cookie can you help me?
This is a different problem. It is not related to the nTransform anymore. I am getting 403 for all but one of the formats. The getInfo
does go through, and I am not getting the "sign in to prove you are not a bot" error, though.
This is a different problem. It is not related to the nTransform anymore. I am getting 403 for all but one of the formats. The
getInfo
does go through, and I am not getting the "sign in to prove you are not a bot" error, though.
For me, Innertube player requests with a non-web client are still working fine for downloading adaptive streams. But not for some (https://github.com/distubejs/ytdl-core/issues/76).
Hey guys! it stopped working we need an update :)