There is a way to enforce safety mode for YouTube in case you're interested. This rule will append safe=active to searches.
It still depends on YouTube defining the content as Adult, but if it is, this is helpful.
Name: YouTube: Safety Mode
Comment: Append safe=active tot he end of youtube search queries.
Rule Criteria: URL.HasParameter ("search_query") equals true
Events: Set URL.ParametersString = URL.ParametersString + "&safe=active"
Already have YouTube Safe Search rule enabled, it works great within YouTube but I had a few links to YouTube in which inappropriate videos got through. I work at a school district and teachers demand YouTube and at the same time students abuse it. I'm trying to find the best compromise to my dilemma. I have it as a coaching category however, I would like to receive emails if they access it a certain amount of time (Similar to what SmartFilter provided). Thanks a lot for your contributions. I'm always finding new features and functionality.
A few things come to mind to this kind of content on MWG.
Does your school have a YouTube for Schools account?
The administrator of this account will then have the ability to include videos of his/her choosing for viewing within the school network. The administrator will also be able to approve access for teacher accounts.
When you sign up, you are assigned a School ID that the proxy can insert into the HTTP header and only those approved videos are allowed.
You could create your own list of sexual words that can block a video if the words appear in a Title, Description, or keyword tags of a video. The same API that looks up the video categories can be modified to lookup the other metadata related to the video. If the data contains any of the words you define, it will block the video. I use it in demonstrations to block every video related to the word *bieber*.
Use the DLP classification engine in 7.2 to block by offensive language or sexual content. Basically it scans titles, description and text of the the video and looks for words in the predefined Acceptable Use dictionary for offensive language and sex.
I have attached my rules that demonstrate #2 and #3 as well as the Category and Uploader blocks.
Thanks for your answer.
Now i can block these videos. The data is not correct, but we want to block shows too, so for the moment it is ok.
And our security manager wants to block all these stuff, not me.
thank you for the example. It is basically similar to the previous posted ones. It seems that there is a general category "Shows". The general category is something like a "main" category, as shown in the list of categories Erik has posted.
Especially "Shows" can have "sub-categories" such as gaming, entertainment, comedy, etc. In the API call MWG does there is only the "main" category returned, so we will not be able to filter on the subcategories, but we will be able to block "Shows" as a geenral category.
At the moment this fails because there is more than one XML tag returned in the API response. It gives the category "Shows", followed by another tag for the "region" and "source" of this videos. Incorrectly MWG picks the LAST of the category tags that are received, which is a numeric value for the region or source. This is why the block for "Shows" does not work here 😞
I am trying to figure out a way to read the correct category so that you can at least block the "Shows" category again.
Everything that is not a show actually should still work. I will provide an update asap.
can anyone else try to see if the following works?
Go to Policy -> Settings -> Engines -> External Lists -> Youtube Categories (API). If you look into the setting you will find the XPath expression used to determine the category. It should look like:
//*[local-name() = 'category']/text()
Can you please replace it by
//*[local-name() = 'category']/text()
This should cause only the first category looked up to be returned to MWG. The previously posted Youtube links should now end up in the category "Shows", which is their "main" category.
Please let me know if this works.
I think this is not the right fix.
Also the URLs is categorized as Shows
YouTube Kategorie: Shows
if "Shows" is returned for the posted Youtube video the change works as expected. The rule set queries the Youtube API to obtain the category, and the category for the video is "Shows". There are several sub-categories for the Shows categories, but this information is not part of the API response. Therefore this rule set can only read the category and has no access to the sub-categories. Therefore you cannot filter for Gaming or Comedy.
You can check the information we get from the API yourself by calling
You will receive an XML file containing all meta-information. If you search for "media:category" you will notice the following lines:
<media:category label="Shows" scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Shows</media:category>
The first returned category tag contains "Shows", which is the category we obtain for restriction in the rule set. The second one contains "6", which is used to identify the original source of the video. "6" means "Original Web Content" in this case. The third tag contains "3" and is used to identiy the type of the media. "3" means "Full Episode".
I will continue looking for a way to get access to the sub-categories, but for the meantime you will only have the chance to block "Shows" as a category completely.