cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 21 of 34

Re: Youtube block by category

FYI,  just to clarify for future google searches.

The differences between the XPaths is this:

The XML returned by by the API looks like this:

    <media:group>

        <media:category label='Shows' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Shows</media:category>

        <media:category scheme='http://gdata.youtube.com/schemas/2007/releasemediums.cat'>6</media:category>

        <media:category scheme='http://gdata.youtube.com/schemas/2007/mediatypes.cat'>3</media:category>

...

    </media:group>

Andre's orginal XPath was this:

     //*[local-name() = 'category']/text()

We assumed that it would only return 1 category element so it would work for most of YouTube.

Now that we see there can be more than one, Andre did this:

     //*[local-name() = 'category'][1]/text()

...which pulls off the first element on the top of the list.

I approached it differently with this:

     //*[local-name() = 'category' and @label]/text()

...which looks for the category and the attribute 'label'.

The only reason i did this was if the elements were ever returned in a different sequence, the the one on top would take. That may not be the one with the actual category in it.

6 of one, half dozen of the other.

Former Member
Not applicable
Report Inappropriate Content
Message 22 of 34

Re: Youtube block by category

Hi,

How do I get the detected category to display on the youtube blocked page? Is there something I am missing.

eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 23 of 34

Re: Youtube block by category

Using my rules I posted above?

I assigned the value to a user-defined variable and use that on the page:

Set User-Defined.YouTubeCategory = ExtLists.String (URL.GetParameter ("v"), "", "")<YouTube: Categories (API)>

Capture.jpg

Former Member
Not applicable
Report Inappropriate Content
Message 24 of 34

Re: Youtube block by category

Hi Erik.

I build your template in the screenshot for english and german.

If some need this, here are the files.

But i have one problem, the URL-Categories and the Reputation is not shown.

All other are good informationen for the admins and the users.

06-08-2012 13-09-15.png

Nachricht geändert durch florian.hallas on 06.08.12 06:10:11 CDT
eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 25 of 34

Re: Youtube block by category

The pages themselves look ok.

If the URL.Categories and reputation are  not displaying, it is because no rules have been triggered that lookup the properties.

If your YouTube rules are above the URL filtering rules, then the block occurs before the category lookup.

Put the YouTube rule below the URL Filtering rules, so the lookup happens first. Then the block pages should be populated.

This is the order my rules are in:

Capture.jpg

Former Member
Not applicable
Report Inappropriate Content
Message 26 of 34

Re: Youtube block by category

Thanks for the hint.

I allowed in my url filter youtube.* but before i make the categorization of my urls.

I added before my rule allowed youtube.com this one

06-08-2012 15-15-21.png

And now it works.

Here is my order of these rules

06-08-2012 15-18-25.png

eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 27 of 34

Re: Youtube block by category

This is similar to some other discussion threads related to GlobalWhitelist not categorizing.

To help with that and this,

I categorize at the beginning of all the rules so they show up in the reports and block pages early on.

Capture.jpg

You will also notice I am setting the username to "Global Whitelist" here so that the it doesn't just log the "-" when something is whitelisted.

Capture2.jpg

Having just the "-" display is not as informative as having a phrase that specifies why it's not authenticated.

Former Member
Not applicable
Report Inappropriate Content
Message 28 of 34

Re: Youtube block by category

Hi,
We´ve begun to use a Youtube application control ruleset.
We´ve configure something wrongly because we´re getting a couple of warning messages in the dashboard:
- "Error during fetch from data source (Configuration: Youtube: (API)) (Origin: External lists filter)"
- "No resource for data source is available (Configuration: Youtube: (API)) (Origin: External lists filter) "

Can anybody lend us a hand with this?

Thanks in advance

eelsasser
McAfee Retired
McAfee Retired
Report Inappropriate Content
Message 29 of 34

Re: Youtube block by category

Get on the command line of MWG and can do this:

      # curl http://gdata.youtube.com/feeds/api/videos/8lMxpDYA5Wg?v=2

or

     # curl http://gdata.youtube.com/feeds/api/videos/8lMxpDYA5Wg?v=2&fields=media:group(media:category)

If the XML file downloads, you have successfully retrieved the metadata. If there are any errors, then any error messages should help you understand why the connection cannot be made.

Former Member
Not applicable
Report Inappropriate Content
Message 30 of 34

Re: Youtube block by category

Trying
# curl http://gdata.youtube.com/feeds/api/videos/8lMxpDYA5Wg?v=2
it works fine but not if I try
# curl http://gdata.youtube.com/feeds/api/videos/8lMxpDYA5Wg?v=2&fields=media:group(med ia:category)

Here is the ruleset we´re using:

El mensaje fue editado por: maitane on 2/04/13 9:04:38 CDT
You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community