Open SimoonDude opened 3 years ago
Yeah, I’ve been facing the same issue. It seems like a recent problem. I don’t know if it’s related to what is going on at youtube-dl. But I couldn’t download using youtube-dl either, and I’m not in the E.U. nor do I have a Google account.
Can someone post a couple of age-restricted videos here? (this is for testing purposes though)
https://www.youtube.com/watch?v=5gZCjMjoilo
https://www.youtube.com/watch?v=fzhHXt7NKUs
https://www.youtube.com/watch?v=cIVPYWyPqKA
A 20$ bounty has been added to this issue.
Anyone opening a PR fixing this issue, will receive 20$ (in BTC) from the Invidious project.
More details: https://github.com/iv-org/invidious/issues/1898
Note: the yt-dlp people found a way to get access to the video by (I think) using the mobile website's embed. However this only works with videos that can be embedded. Having this solution implemented is "enough" for you to get the bounty.
Related: https://github.com/yt-dlp/yt-dlp/commit/4e6767b5f2e2523ebd3dd1240584ead53e8c8905
Just add &c=TVHTML5&cver=6.20180913
to https://github.com/iv-org/invidious/blob/993d731c92f6f07e4bee4a222c02e1e47d7f9d6e/src/invidious/videos.cr#L994
Note that this is a temporary fix and we expect it to break in the near future. See https://github.com/yt-dlp/yt-dlp/pull/328 for some fallbacks
The x-youtube-client-version
header would also have to be set to 6.20180913
The
x-youtube-client-version
header would also have to be set to6.20180913
No. get_video_info
doesnt need x-youtube-client-version
header
Yep. However, Invidious appends those headers by default as seen in here: https://github.com/iv-org/invidious/blob/993d731c92f6f07e4bee4a222c02e1e47d7f9d6e/src/invidious/helpers/utils.cr#L4-L17
In order to get this fix to work, x-youtube-client-version
would also have to be set to 6.20180913
hm.. that is a problem. The header for all other requests should still be 2.20210407.08.00
Is it not possible to send this request without the header?
Nope. If we want to use the connection pool, all of those headers would get added no matter what. The only workaround for this is to set x-youtube-client-version
to 6.20180913
during the request function call since the add_yt_headers
function doesn't override existing headers.
required_parameters = URI::Params.new({
"video_id" => [id],
"eurl" => ["https://youtube.googleapis.com/v/#{id}"],
"html5" => ["1"],
"c" => ["TVHTML5"],
"cver" => ["6.20180913"],
})
embed_info = HTTP::Params.parse(YT_POOL.client &.get("/get_video_info?#{required_parameters}", headers: HTTP::Headers{"x-youtube-client-version" => "6.20180913"}).body)
Can this userscript be pasted somewhere into invidious? It worked for https://www.youtube.com/watch?v=KgmoMO66uPg :
Can this userscript be pasted somewhere into invidious? It worked for youtube.com/watch?v=KgmoMO66uPg :
That's already what the PR #2205 is doing.
Oh ok, nevermind then....
Reopening as not every age restricted videos are unblocked.
@unixfox can you name a problem video? I think I have a fix
Well this video used to not work with the fix for bypassing age restricted videos: https://www.youtube.com/watch?v=cIVPYWyPqKA but now it works :thinking:. I can't find a video that we can't bypass though.
We are still interested in your potential fix though.
https://github.com/yt-dlp/yt-dlp/pull/328#issuecomment-864117168
Cr381pDsSsA
is one that still doesn't play even after #2205
Using cookies obviously work, the challenge is making it work without logging in
you can make a request to /get_video_info using the ANDROID client [4].
I have a strange feeling that all of get_video_info has been removed as I've seen it 404 on everything I've thrown it - age restricted or not. Some googling shows that a while back they added more required fields which could be a possiblity, but I'd say they probably just entirely removed this endpoint to stop people from bypassing age restriction for legal reasons.
I have a strange feeling that all of get_video_info has been removed as I've seen it 404 on everything I've thrown it
Seems like it. We also couldn't find a set of parameters that works. the embed-workaround still works for embeddable videos, but auth seems necessary for everything else now
there seems to be a greasyfork script to fix this issue, so does this code help? https://greasyfork.org/en/scripts/375525-youtube-age-verification-bypass/code
there seems to be a greasyfork script to fix this issue, so does this code help? https://greasyfork.org/en/scripts/375525-youtube-age-verification-bypass/code
This is what https://github.com/iv-org/invidious/pull/2205 did. That method no longer works
the embed-workaround still works for embeddable videos
@pukkandan Could you point out which one is that?
You need to re-request the /browse
API with the WEB_EMBEDDED_PLAYER
client instead of WEB
(other clients that work: ANDROID_EMBEDDED_PLAYER, IOS_MESSAGES_EXTENSION). See related params here
This method can bypass embeddable videos like HtVdAasjOgU
, but others like Tq92D6wQ1mg
will still not work
https://github.com/iv-org/invidious/pull/2220 already implements most of what is needed for this
There's a new bypass method: https://github.com/yt-dlp/yt-dlp/issues/574#issuecomment-887171136
All our findings so far: https://github.com/yt-dlp/yt-dlp/pull/575#issuecomment-887739287
Updated method created in PR https://github.com/iv-org/invidious/pull/2329, feel free to test it and submit your feedback.
I just stumbled across this issue. It worked in my build from 2022.01.21 and failed in the latest. After some testing, according to git disect commit 99091e919c9af56c27ca8aebd790c3b64b564f78 broke it again:
last good: 2022.02.03-6ddbccbc first bad: 2022.02.03-99091e91
Message from @TheFrenchGhosty:
The age restriction bypass isn't working consistently, it will only properly work after ~5 requests (just refreshing the page on the instance works). When it works once, it will work consistently everytime (because of caching I'm guessing).
Screenshots
Additional context
I can provide some examples videos IDs at request.
On a related note: the age restricted videos, don't have descriptions.
Youtube is rolling out some changes that breaks tier 3 age-gate bypass. There is currently no known workaround (other than passing the request through a proxy). yt-dlp and newpipe are also affected
@pukkandan: is there a yt-dlp or newpipe issue i can follow for this?
New method for bypass: https://github.com/yt-dlp/yt-dlp/pull/3233
New method submitted in https://github.com/iv-org/invidious/pull/2996 Integrated on https://yewtu.be
Here's 4 SFW videos that are age restricted, for testing purpose:
https://youtube.com/watch?v=FISUqoODw9Q https://youtube.com/watch?v=KVjHwrKJg8k https://youtube.com/watch?v=h16HA4XjyD8 https://youtube.com/watch?v=FISUqoODw9Q
4 SFW-ish more, from another channel:
https://youtube.com/watch?v=eJZqlQ3xvAo https://youtube.com/watch?v=VTxPsfQ4KL4 https://youtube.com/watch?v=Ufm3nYuHdhc https://youtube.com/watch?v=7lz8RpDtrGw
On Tue, Mar 29, 2022 at 01:00:24PM -0700, TheFrenchGhosty wrote:
Here's 4 SFW videos that are age restricted, for testing purpose:
there's a 4-tiered list of videos that's used to check agegate bypasses: https://github.com/yt-dlp/yt-dlp/pull/575#issuecomment-888837000
On Tue, Mar 29, 2022 at 01:00:24PM -0700, TheFrenchGhosty wrote:
Here's 4 SFW videos that are age restricted, for testing purpose:
there's a 4-tiered list of videos that's used to check agegate bypasses: https://github.com/yt-dlp/yt-dlp/pull/575#issuecomment-888837000
Tiers 1,2 and 3 seems to work with the new method, which is great.
Should this ticket be closed now that #2996 has been merged? Or is there still an issue?
Should this ticket be closed now that #2996 has been merged? Or is there still an issue?
No because not all age restricted videos can be bypassed so this issue is not entirely fixed.
tbh, It is doubtful this can ever can be fully fixed unless setting up an account proxy server is an acceptable option
tbh, It is doubtful this can ever can be fully fixed unless setting up an account proxy server is an acceptable option
We have been talking about integrating that into invidious so it may come one day.
Note: encrypted age-restricted videos don't work, see: https://github.com/iv-org/invidious/issues/3245
Example video IDs:
Non-working video ID, reported to me by e-mail: A2W2EBMX8DY
For me, I still have issues watching age restricted videos. Loading them are significantly more slowly (which greatly influences watching) than loading other videos. I can observe this for all videos listed in this comment.
For me, I still have issues watching age restricted videos. Loading them are significantly more slowly (which greatly influences watching) than loading other videos. I can observe this for all videos listed in this comment.
Known issue, it's tracked in https://github.com/iv-org/invidious/issues/3245
Videos that have been marked age-restricted don't play Any video with age-restriction doesn't work. All you can see is the thumbnail. I've tested this on all public instances.
Steps to reproduce the behavior:
Even the play button doesn't work
Additional context