Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YouTube] Age verification issues - Can't download video. #28578

Closed
5 tasks done
54m4d opened this issue Mar 28, 2021 · 32 comments
Closed
5 tasks done

[YouTube] Age verification issues - Can't download video. #28578

54m4d opened this issue Mar 28, 2021 · 32 comments
Labels

Comments

@54m4d
Copy link

54m4d commented Mar 28, 2021

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.03.25
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones
    (i found one similar but my --cookies are not expired as stated in this issue [youtube] Unable to download age-gated videos. #28468)

Verbose log

youtube-dl --verbose https://www.youtube.com/watch?v=rR8s72aouNE
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=rR8s72aouNE']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.03.25
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-03-28-git-8b2bde0494-full_build, ffprobe 2021-03-28-git-8b2bde0494-full_build
[debug] Proxy map: {}
[youtube] rR8s72aouNE: Downloading webpage
[youtube] rR8s72aouNE: Refetching age-gated info webpage
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 806, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 827, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\youtube.py", line 1658, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Description

  • Hello

  • I tried to download an age-gated video and i got some age-verification errors as you can see in the Verbose log above.


  • When i tried to provide the --cookies then i got the error below:
youtube-dl --verbose --cookies C:/Users/account/Desktop/cookies.txt https://www.youtube.com/watch?v=rR8s72aouNE
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--cookies', 'C:/Users/account/Desktop/cookies.txt', 'https://www.youtube.com/watch?v=rR8s72aouNE']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.03.25
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-03-28-git-8b2bde0494-full_build, ffprobe 2021-03-28-git-8b2bde0494-full_build
[debug] Proxy map: {}
[youtube] rR8s72aouNE: Downloading webpage
ERROR: Verify your age
Complete a brief check to show you're old enough to watch this video. Learn more
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 806, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 827, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\youtube.py", line 1658, in _real_extract
youtube_dl.utils.ExtractorError: Verify your age
Complete a brief check to show you're old enough to watch this video. Learn more
  • I'm signed in to my account and i verified that the --cookies are not expired. and of course my date of birth is over 18 years.

  • I know that there is an age-restriction in the EU region, but i also can't download using just the normal command as with all other age-gated videos.

  • What gives?

Capture 28_03_2021_19_55_29

@Suika
Copy link

Suika commented Mar 29, 2021

You are probably connecting from EU, right?
A change to YT was announced ~4 month that there will be extra steps for age verification in EU, iirc.
If you connect from outside of EU, it should work.

@54m4d
Copy link
Author

54m4d commented Mar 29, 2021

Have you tried to download the video?

@Rudbekia
Copy link

My issue(#28468) ended by @dstftw because the cookie seems to be expired. but as I wrote in the issue, it was the fresh cookies.txt.
This is not going to happen in the United States, so this is unlikely to be fixed.

@remitamine
Copy link
Collaborator

there is nothing to be done on the youtube-dl side.
either use a proxy/VPN from a country outside the EU, or complete the age verification process.

@54m4d
Copy link
Author

54m4d commented Mar 30, 2021

My issue(#28468) ended by @dstftw because the cookie seems to be expired. but as I wrote in the issue, it was the fresh cookies.txt.
This is not going to happen in the United States, so this is unlikely to be fixed.

  • My cookies are not expired too.

  • Does that mean the contrubutors are unlikely to fix any issues that occure outside the US

@54m4d
Copy link
Author

54m4d commented Mar 30, 2021

@remitamine

  • I just connected to a US server using VPN, and this is the report i got:
youtube-dl --verbose https://www.youtube.com/watch?v=rR8s72aouNE
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=rR8s72aouNE']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.03.25
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-03-28-git-8b2bde0494-full_build, ffprobe 2021-03-28-git-8b2bde0494-full_build
[debug] Proxy map: {}
[youtube] rR8s72aouNE: Downloading webpage
[youtube] rR8s72aouNE: Refetching age-gated info webpage
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 806, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\YoutubeDL.py", line 827, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp5nc448kk\build\youtube_dl\extractor\youtube.py", line 1658, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Note: i tried other videos and they worked, keep in mind that this is not an age-verification question as the US is not affected by the AVMSD legislation as in the EU.

@remitamine
Copy link
Collaborator

Does that mean the contrubutors are unlikely to fix any issues that occure outside the US

it's not about the issue not related to the US, it's that youtube won't allow access to the video when you're accessing a non-embedable age-restricted video from the EU with passing the new age verification requirement, youtube-dl can't simply bypass this condition.

I just connected to a US server using VPN, and this is the report i got:

you didn't pass the cookies.

@54m4d
Copy link
Author

54m4d commented Mar 30, 2021

Does that mean the contrubutors are unlikely to fix any issues that occure outside the US

it's not about the issue not related to the US, it's that youtube won't allow access to the video when you're accessing a non-embedable age-restricted video from the EU with passing the new age verification requirement, youtube-dl can't simply bypass this condition.

I just connected to a US server using VPN, and this is the report i got:

you didn't pass the cookies.

Yes, i did not pass the --cookies not sure why that is required as i did download many other age-gated videos without it?
Can somebody try to explain why that is?

@Rudbekia
Copy link

@remitamine Then in the EU or countries using new age verification, Does that mean there is no way to download videos without a VPN connection? Even though I use the cookie of the ID whose age has been verified.

@remitamine
Copy link
Collaborator

@remitamine Then in the EU or countries using new age verification, Does that mean there is no way to download videos without a VPN connection? Even though I use the cookie of the ID whose age has been verified.

no, if you can't download an age-restricted video using non-expired cookies for an account that has the ability to watch the video in the browser then this would be considered an issue, however, there won't much that can be done unless a developer can reproduce the same problem.

@54m4d
Copy link
Author

54m4d commented Mar 30, 2021

@Rudbekia

  • If you connect from the EU and have not verified, theres is now way without the VPN.

  • If you have already verified your account you can just pass the cookies and download.

Try for yourself and report back.

@Rudbekia
Copy link

@remitamine Please check your email.

@watchinofoye
Copy link

watchinofoye commented Jun 11, 2021

I have exactly the same problem.
About one week ago, I've tried to download a personal playlist containing at least one video 18+. youtube-dl refused to download it, so I've provides cookie file and it worked.

Now, I'm trying to redownload the playlist - because I've added videos since the last week - but youtube-dl complains about age-verification again. I've recreated a cookie file but it still complains.
When I'm trying to access to the video from Firefox, no problem at all. I've event tried to recreate the cookie file while visiting the video in question.

Furthermore, the video is already downloaded so why youtube-dl does not just ignore the video and download the other videos of the playlist ?

@iFUCKINGHATEcomputers
Copy link

iFUCKINGHATEcomputers commented Jun 16, 2021

Something strangely fortuitous happens to me (I'm using the Youtube-DLG interface if that matters). When daddy Google and mummy EU ask for my papers on a video like this and I try youtube-dl, I get the typical Sign in to confirm your age error.

However, if I wait a few minutes and try to download the same video with youtube-dl again, it just werks™. With no extra commands, no strange methods...

@iFUCKINGHATEcomputers
Copy link

Nevermind, age-restricted videos aren't working again as of recently... apparently YouTube just patched out something called the /get_video_info endpoint.

@reallyuniquename
Copy link

Possible fixes.

Fixing requests to get_video_info.
#29333 (comment)

Switching to some internal Youtube API.
#29086 (comment)

@iFUCKINGHATEcomputers
Copy link

And the solution was to pass the cookie, problem solved.

Then why was youtube-dl working for me before, without needing to give Google my ID or pass any cookies? I think this problem goes deeper, the lab boys still seem to be working on it.

@hacxman
Copy link

hacxman commented Jun 24, 2021

It doesn't play age restricted videos again, look:

$ youtube-dl --verbose https://www.youtube.com/watch?v=rR8s72aouNE
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=rR8s72aouNE']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 2.7.18 (CPython) - Linux-5.4.0-74-generic-x86_64-with-Ubuntu-20.04-focal
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] rR8s72aouNE: Downloading webpage
[youtube] rR8s72aouNE: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 404: Not Found
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 475, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 465, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2069, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 808, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1503, in _real_extract
File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2644, in compat_parse_qs
File "/usr/local/bin/youtube-dl/youtube_dl/compat.py", line 2614, in _parse_qsl
AttributeError: 'bool' object has no attribute 'split'

@0x00Jeff
Copy link

0x00Jeff commented Jul 6, 2021

Hi, I have the same issue with age verification, and I am not connected from EU

my understanding according to this, is that I can chain mpv with youtube-dl, to watch youtube videos without ads / age verification / ... without any cookies whatsoever
I've been using it for a while now, for videos that are not age restricted, but when I tried it on a age restricted I got the following error

youtube_dl.utils.ExtractorError: Sign in to confirm your age
The video you have requested has been rated S N and may contain content intended for mature audiences.

is my assumption about watching age-restriction videos without cookies or signing is still correct in the current version (I'm using youtube-dl 2021.06.06)?

please correct me so I can post more details

@reallyuniquename
Copy link

@0x00Jeff you have to wait for the next youtube-dl release. Current version 2021.06.06 doesn't work well with age restricted videos.

@krukhlis
Copy link

By the way guys, it doesn't work in Canada as well:
image

@reallyuniquename
Copy link

It looks like YouTube deprecated /get_video_info endpoint or changed required set of params once again.

@reallyuniquename
Copy link

Another possible fix yt-dlp/yt-dlp#574 (comment)

@nicolaasjan
Copy link

Another possible fix yt-dlp/yt-dlp#574 (comment)

Tried that (I'm from the EU) with c0bc527 implemented.
It works for some video's (e.g. 3gKwo9Kgf3w), but not for others (e.g. rR8s72aouNE)

@reallyuniquename
Copy link

There is no fix for videos that can't be embedded.

@kenorb
Copy link

kenorb commented Aug 7, 2021

Doesn't work with IFjle80na1A using 2021.06.06 version.
Although works with --cookies (with 'get cookies.txt' extension in Chrome).

@krrrr0
Copy link

krrrr0 commented Aug 14, 2021

2021.06.26 does not work in South Korea: Got ERROR: Sign in to confirm your age

Here we have our own age-check systems like the EU.
I tried --proxy option to proxy to Japan, also didn't work. I can't figure out why. 🤔

Should I wait until the next release?

@nicolaasjan
Copy link

Should I wait until the next release?

Hmm...
You may have to wait a long time.
See this:
#29753

In the mean time, you could try with the fork yt-dlp.
It can download IFjle80na1A just fine and without providing cookies.

@chrcoluk
Copy link

@fosam commented on 30 Mar 2021, 18:39 BST:

@Rudbekia

  • If you connect from the EU and have not verified, theres is now way without the VPN.

  • If you have already verified your account you can just pass the cookies and download.

Try for yourself and report back.

How does one pass the cookies from browser to youtube-dl ?

@nicolaasjan
Copy link

How does one pass the cookies from browser to youtube-dl ?

It's in the Readme. :)
https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl

@rautamiekka
Copy link
Contributor

yt-dlp comes with this param which will do the work for you, mostly:

    --cookies-from-browser BROWSER[:PROFILE]    Load cookies from a user profile of the given web browser. Currently supported browsers are: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi. You
                                                can specify the user profile name or directory using "BROWSER:PROFILE_NAME" or "BROWSER:PROFILE_PATH". If no profile is given, the most recently accessed one is
                                                used

@j3pic
Copy link

j3pic commented Jul 14, 2022

YouTube has added more restrictions. Now you can't download age-restricted videos from the US even with the cookie. When viewing in the browser you have to click on two prompts every time you watch the video.

This was referenced Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests