distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
206 stars 43 forks source link

"Sign in to confirm your age" issue even with cookies / userAgent #65

Closed northamerican closed 1 month ago

northamerican commented 1 month ago

Describe the bug

In the past 48 hours or so, age-restricted videos return a "Sign in to confirm your age" error, even when supplying ytdl.createAgent with all .youtube.com cookies.

Environment

sepehrsamavati commented 1 month ago

Version 4.13.7 was working for me. I received a deprecation warning and updated to v4.14.3, but it stopped working. After reverting back to 4.13.7, it is now functioning correctly. Give it a try.

northamerican commented 1 month ago

@sepehrsamavati i can confirm this is a regression, likely in https://github.com/distubejs/ytdl-core/compare/4.13.7...4.14.0

tux1765 commented 1 month ago

Can also confirm. I tried to export a cookie from a mobile browser as well and that does not seem to work either. When using my laptop though the cookie generated at least gets me from Sign in to confirm your age to UnrecoverableError: This video may be inappropriate for some users.

Is it possible to add logic to override using IOS player, or Android player and keeping with the old logic? I am willing to code something up. Unless the juice is worth the squeeze for figuring out IOS/Android player cookie options.

northamerican commented 1 month ago

@tux1765

yup. with 4.13.7, using these three youtube cookies : __Secure-1PSID, __Secure-1PSIDTS, LOGIN_INFO, each with the name, value, and secure: true was enough to download the video. in 4.14+, the error is now This video may be inappropriate for some users.

skick1234 commented 1 month ago

I brought back the web client parser for now, so cookies should work as expected. However, a 403 error may occur with this method. I will investigate a new way later, perhaps using a TV client, instead.