Context: I am developing a firefox/waterfox extension to completely block the "age restricted" videos on youtube, even if the user is logged into his google account.
My question is: is there any meta tag or any meta data in the dom of the webpage that indicate the the video is age restricted ?
(PS: note that if I am logged in my google/youtube account, the user message "age restricted" does not appear and the video start to play, si I cannot trigger the blocking on such message).
(PPS: I know about safe mode and moderate mode which can be forced in the DNS server by using a CNAME and this is not the solution thant am looking for, because in moderate mode I can see the videos anyway if I log in my account, assuming that my age is more than 18 in my account, and even if it's true or false I reality)
(PPPS: I guess it would be possible also to catch the flag in some kind of firewall...)
Check the documentation. You should make a request and get
contentDetails.contentRatingproperty. Here you can try it.Example: I did request for
id=dQw4w9WgXcQ(video) and got this response.