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 restricted video not downloading? #8583

Closed
10 of 11 tasks
solbu opened this issue Nov 14, 2023 · 8 comments
Closed
10 of 11 tasks

YouTube: Age restricted video not downloading? #8583

solbu opened this issue Nov 14, 2023 · 8 comments
Labels
question Question

Comments

@solbu
Copy link

solbu commented Nov 14, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

Norway

Provide a description that is worded well enough to be understood

The YouTube age restriction bypass that yt-dlp has, stopped working some 2 weeks ago.
It used to just download age restricted videos, where you need to login to verify your age. Now it exit with an Error saying the video is age restricted.

I just upgraded to the latest version 2023.11.14, which was released some 30 minutes ago.
I am one of the packagers at the Mageia linux distro, so I maintain my own local RPM repo with updated yt-dlp packages. Meaning I always run the latest stable yt-dlp version.

I was waiting for the new version to release to see if it would be fixed.
And the 2023.11.14 which landed 30 minutes ago did not fix it, which means no one have reported it.
If they have, I can't find it in the bugtracker.

If you need a video to test on, here is a youtube video ID: «RBPk185Hd0A»

[solbu@solbu-1 ~/tmp/del]$ rpm -q yt-dlp
yt-dlp-2023.11.14-0.solbu8

[solbu@solbu-1 ~/tmp/del]$ yt-dlp --version
2023.11.14

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[solbu@solbu-1 ~/tmp/del]$ yt-dlp -vU https://www.youtube.com/watch?v=RBPk185Hd0A
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=RBPk185Hd0A']
[debug] User config "/home/solbu/.config/yt-dlp/config": ['--restrict-filenames', '--compat-options', 'filename']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.11.14 from yt-dlp/yt-dlp [a9d3f4b20] (zip)
[debug] Compatibility options: filename
[debug] Python 3.8.14 (CPython x86_64 64bit) - Linux-5.15.122-desktop-1.mga8-x86_64-with-glibc2.2.5 (OpenSSL 1.1.1u  30 May 2023, glibc 2.32)
[debug] exe versions: ffmpeg 4.3.6, ffprobe 4.3.6
[debug] Optional libraries: Cryptodome-3.9.8, brotli-1.0.9, certifi-2022.12.07, mutagen-1.45.1, requests-2.25.1, sqlite3-3.39.2, urllib3-1.26.5, websockets-8.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1899 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.11.14 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.11.14 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=RBPk185Hd0A
[youtube] RBPk185Hd0A: Downloading webpage
[youtube] RBPk185Hd0A: Downloading ios player API JSON
[youtube] RBPk185Hd0A: Downloading tv embedded player API JSON
[youtube] RBPk185Hd0A: Downloading android player API JSON
[youtube] RBPk185Hd0A: Downloading android embedded player API JSON
[youtube] RBPk185Hd0A: Downloading web embedded client config
[youtube] RBPk185Hd0A: Downloading player f279c958
[youtube] RBPk185Hd0A: Downloading web embedded player API JSON
ERROR: [youtube] RBPk185Hd0A: Sign in to confirm your age. This video may be inappropriate for some users.
  File "/usr/bin/yt-dlp/yt_dlp/extractor/common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "/usr/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 4176, in _real_extract
    self.raise_no_formats(reason, expected=True)
  File "/usr/bin/yt-dlp/yt_dlp/extractor/common.py", line 1193, in raise_no_formats
    raise ExtractorError(msg, expected=expected, video_id=video_id)
@solbu solbu added site-bug Issue with a specific website triage Untriaged issue labels Nov 14, 2023
@bashonly
Copy link
Member

yt-dlp https://youtube.com/watch?v=HtVdAasjOgU still works

If the creator has disabled embedding of the video, yt-dlp's built-in age-gate bypass method will not work. That's likely what is going with the OP's video.

Your options are either to pass cookies or try this plugin

@bashonly bashonly added question Question and removed site-bug Issue with a specific website triage Untriaged issue labels Nov 14, 2023
@bashonly bashonly changed the title YouTube: Age restriction videos no longer downloading YouTube: Age restricted video not downloading? Nov 14, 2023
@jimlynnjulian
Copy link

jimlynnjulian commented Nov 16, 2023

I had a similar experience an hour ago. In mine, permission to access Google Chrome 'Cookies' file was denied which caused the error.
"PermissionError: [Errno 13] Permission denied: 'C:\Users\jimly\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies'
[9972] Failed to execute script 'main' due to unhandled exception!"

@pukkandan
Copy link
Member

@jimlynnjulian #7271

@jimlynnjulian
Copy link

@jimlynnjulian #7271

Thanks for the info. Ended up using Firefox with the commandline. Worked.

@solbu
Copy link
Author

solbu commented Nov 17, 2023

If the creator has disabled embedding of the video, yt-dlp's built-in age-gate bypass method will not work. That's likely what is going with the OP's video.

Aha. That sounds like what is happening.

Your options are either to pass cookies or try this plugin

Passing cookies means that one need a Youtube login, which I don't have.
My reason for downloading it is to view it. I refuse to login to video services and enable them (Google in this case) to without a doubth know for a fact who I am, where as viewing without an account means they have to Guess who I am.
It is a calculated guess in their part, but still a guess.

Will look into the plugin thou. :-)

@gamer191
Copy link
Collaborator

gamer191 commented Nov 17, 2023

@solbu if it helps, yt-dlp can download age-gated videos with any account, as long as you set your birthday to be 18+ years old. In other words, yt-dlp can bypass the id requirement and hence allow you to download age-gated videos from a throwaway account

@solbu
Copy link
Author

solbu commented Nov 17, 2023

@solbu if it helps, yt-dlp can download age-gated videos with any account, as long as you set your birthday to be 18+ years old. In other words, yt-dlp can bypass the id requirement and hence allow you to download age-gated videos from a throwaway account

But I need some sort of YouTube account to do this, yes?
I am not willing to do that.

I really am «allergic» to logging in to any video service for any reason.
If I can't watch something without logging in somewhere, I am not watching said content.

@bashonly
Copy link
Member

Closing as there is nothing else we can do to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

5 participants