question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[youtube] Unable to download age-gated videos.

See original GitHub issue

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running youtube-dl version 2021.03.14
  • 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

Verbose log

non Cookies set.

C:\Users\PC\Downloads>youtube-dl iMJ6BNYipv0 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['iMJ6BNYipv0', '-v']
[debug] Encodings: locale cp949, fs utf-8, out utf-8, pref cp949
[debug] youtube-dl version 2021.03.14
[debug] Python version 3.9.2 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
[debug] Proxy map: {}
[youtube] iMJ6BNYipv0: Downloading webpage
[youtube] iMJ6BNYipv0: 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:\private\python3.9.2\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\YoutubeDL.py", line 827, in __extract_info
    ie_result = ie.extract(url)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\extractor\youtube.py", line 1658, in _real_extract
    raise ExtractorError(reason, expected=True)
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Cookies set.

C:\Users\PC\Downloads>youtube-dl --cookies cookies.txt iMJ6BNYipv0 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'cookies.txt', 'iMJ6BNYipv0', '-v']
[debug] Encodings: locale cp949, fs utf-8, out utf-8, pref cp949
[debug] youtube-dl version 2021.03.14
[debug] Python version 3.9.2 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
[debug] Proxy map: {}
[youtube] iMJ6BNYipv0: Downloading webpage
ERROR: This video may be inappropriate for some users.
Traceback (most recent call last):
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\YoutubeDL.py", line 827, in __extract_info
    ie_result = ie.extract(url)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "c:\private\python3.9.2\lib\site-packages\youtube_dl\extractor\youtube.py", line 1658, in _real_extract
    raise ExtractorError(reason, expected=True)
youtube_dl.utils.ExtractorError: This video may be inappropriate for some users.

Description

If set cookies or not, will get this error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:16

github_iconTop GitHub Comments

1reaction
Rudbekiacommented, Mar 17, 2021

try downloading without cookies also try with a new account cookies maybe there is some problem with old account.

Not working. but works on youtube-dl 2021.01.24.1. and also not working on 2021.02.04 I don’t know the difference between the two.

0reactions
nicolaasjancommented, Mar 20, 2021

Lol. The video that you are trying to download is of an Indian channel and It is possible that they set the video only for some countries like India and its neighbours. I live in India and so I can download the video. you can try to change country to India in your youtube account and download the video by new cookies.

I don’t really need this video; it’s a test case. But in the past I was able to bypass this by downloading via Tor with this youtube-dl option:

--proxy socks5://127.0.0.1:9150/

and setting my exit node to India and putting this in the torrc file:

ExitNodes {IN}
StrictNodes 1
Read more comments on GitHub >

github_iconTop Results From Across the Web

youtube-dl not downloading any "age restricted" video
To download age restricted youtube videos with youtube-dl, you need to do the following: Sign in ...
Read more >
So there is no way to download youtube vids with age ... - Reddit
Can someone explain me how can I download these videos? ... I assume if you can view those videos when logged in to...
Read more >
How to Download Age-restricted YouTube Videos
1. Launch 4K Video Downloader. 2. Click Tools > Preferences at the menu bar. 3. Click Log In.
Read more >
Why can't we download any restricted YouTube video ... - Quora
If its age restricted video just sign in with Google account.. If you can view it you can download it. Some apps i...
Read more >
How do I enable youtube-dl to bypass the age restriction on ...
There is a workaround, but not exactly by using youtube-dl . ... To download age restricted youtube videos with youtube-dl, you need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found