-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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.com "ERROR: Content Warning" #16445
Comments
You did not pass credentials to youtube-dl. |
@dstftw there you go youtube-dl.exe -i --no-playlist -R 100 --fragment-retries 100 -c -w -F https://youtu.be/5wHbTXgy0M4 |
youtube-dl -F -v https://www.youtube.com/watch?v=zAa6CS6ALhM Checklist
Verbose log
DescriptionSame question, other age-gated content works, except this one. |
This is a case of reporting a misleading status message. The error message it shows in this case is actually a warning, and not a fatal error, but it's from beyond the age-gate page. And it turns out that there's a more pressing failure, so the inability to download is real. The true error, which youtube-dl should probably report instead. is likely:
The problem is that the age_gate code path doesn't check for such error messages. Instead the operation fails later upon discovering that there is no actual video url (or dash manifest) to download. In other words, the error message you're getting is actually just the warning that would apply if you did "watch this video on YouTube." To fix the error message, insert the following three lines into extractor/youtube.py: youtube-dl/youtube_dl/extractor/youtube.py Lines 1728 to 1735 in c2d125d
youtube-dl/youtube_dl/extractor/youtube.py Lines 1736 to 1737 in c2d125d
cc: @dstftw |
Actually, it turns out that those three lines are applicable to the non-age-gated code path as well. So it would be even better to insert them here instead:
youtube-dl/youtube_dl/extractor/youtube.py Lines 1813 to 1817 in c2d125d
|
ping @dstftw -- this is an easy 3-line fix if you want to adopt it... Besides giving a more correct error message for age-gate failures, this change also makes youtube-dl abandon those cases earlier on, which avoids further wasted effort extracting metadata. |
is as useless and incorrect as the current one. The real error in my case is
|
Thanks. That's why you're the expert. |
Before I post what may be a duplicate, is it expected behavior now that certain age-gated videos cannot be downloaded without logging in? I thought previously youtube-dl had ways of bypassing such checks. |
@diamondsw Youtube-dl bypasses it by doing (this is my assumption) /embed/ |
Despite the commit on Aug 5, this issue still persists. I'm calling Youtube-DL via an import into a script of my own. I'm setting login data and passing it to youtube-dl. This appears to work fine for most videos, but age-gated videos with embeds disabled refuse to work. Tests by calling youtube-dl directly from the command line are also unsuccessful. |
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like this:[x]
)Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2018.05.09. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-v
flag to your command line you run youtube-dl with (youtube-dl -v <your command line>
), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
While downloading age-gated content, one of the videos (see output) fails with "ERROR: Content Warning".
Tested it while passing the login credentials and cookies. Any other age-gated content works, except this one.
The text was updated successfully, but these errors were encountered: