Simple-YouTube-Age-Restriction-Bypass: Does not seem to work on embedded videos?
<iframe width="2143" height="1214" src="https://www.youtube.com/embed/rAu1h2NE9Uk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Open this for example in a page, for me on Chrome 94 it is not sucessfull in bypassing the age-restriction for iframes
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (4 by maintainers)
Commits related to this issue
- Fix embed player unlock #85 — committed to zerodytrash/Simple-YouTube-Age-Restriction-Bypass by zerodytrash 3 years ago
It’s working!
previewPlayabilityStatusis only available in an embed, soerrorScreenwould still be better as it works for both embed and non-embed.With a little bit of debugging with the wonderful chrome devtools I found something:
On line 687:
// Unlock #3: Embedded Player inital data structure else if (isEmbeddedPlayerObject(ytData) && isAgeRestricted(ytData.previewPlayabilityStatus)) {on isAgeRestricted line 299:
return !!playabilityStatus.desktopLegacyAgeGateReason || UNLOCKABLE_PLAYER_STATES.includes(playabilityStatus.status);UNLOCKABLE_PLAYER_STATES doesn’t include the string UNPLAYABLE which is the string that my playabilityStatus field has in the yData
If I modify the script to add “UNPLAYABLE” to UNLOCKABLE_PLAYER_STATES it works.
I think your implementation is fine! I didn’t check if the same method existed on the embed, since I assumed they probably would be the same.
Therefore you may close this issue.
Yes I can confirm that link is present in the response.