Eric R. Meyers > WWW-YouTube > youtube/tag/tag.plx


Annotate this POD


Open  0
View/Report Bugs


youtube/tag/tag.plx - WWW::YouTube ( vlbt = youtube.videos.list_by_tag )


Example #1 A 'very nice girl'?

$ ~/youtube/tag/tag.plx '--ml_tag=very nice girl' --html_disarm --html_thumbnail --ml_max_pages=1

$ ls ~/youtube/tag/tag_very_nbsp_nice_nbsp_girl

Example #2 A 'very hot girl'?

$ ~/youtube/tag/tag.plx '--ml_tag=very hot girl' --html_columns=3 --ml_per_page=6 --ml_max_pages=5

$ ls ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl

Example #3 A 'keeper' link to call-on 'very hot girl' in the future?

$ ln -s ~/youtube/tag/tag.plx ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl.plx

$ rm -Rf ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl

$ ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl.plx --ml_first_page=99 --html_columns=1 --ml_per_page=1 --ml_max_pages=1

$ ls -1 ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl




$ man XML::Dumper

$ zcat ~/youtube/tag/tag_very_nbsp_hot_nbsp_girl/video_list.xml.gz | more

Example #4 Update your 'keeper' list

$ for x in tag_*.plx;do $x --html_columns=3 --ml_per_page=6 --ml_max_pages=5;done

   --help|? brief help message

   --man full documentation



Print a brief help message and exits.


Prints the manual page and exits.


To protect children.

I developed this program to find and flag videos as inappropriate material.


I run by youtube/tag/tag.plx armed to flag videos.

With regard to the colored Video Tag and Video Author labels displayed, corresponding to the Video's tags or the Author's username at YouTube:

Green : Found, and your tag string matched Exactly.

Yellow : Found, but your tag string matched in a Partial or a Fuzzy way.

Red : no match found.

There are options for this:

--ml_vlbt_want=[all|found_(tagged|author)|not_found_(tagged|author)] ## What's saved and displayed

--xml_api_vlbt_want=[all|found_(tagged|author)|not_found_(tagged|author)] ## What's saved

--html_api_vlbt_want=[all|found_(tagged|author)|not_found_(tagged|author)] ## What's displayed

So now, your ready for the tag application: ( vlbt = youtube.videos.list_by_tag )

Let's setup to play videos by 'tag'

As your username:

$ [ ! -d ~/youtube || ! -d ~/youtube/video ] && man WWW::YouTube

$ mkdir ~/youtube/images ## youtube application images directory


> ~/youtube/images/ERMpowered.gif

$ chmod a+r ~/youtube/images/ERMpowered.gif

$ mkdir ~/youtube/tag ## tag application directory


> ~/youtube/tag/tag.plx

$ chmod +x ~/youtube/tag/tag.plx

TAG SETUP [1] for Mozilla Firefox Web Browser

This Mozilla Firefox setup is an EXPERIMENTAL setup:

This is a functional prototype, a work in progress, so please be flexible for a while. Thanks.

Mozilla browsers, Mozilla Firefox included, have a -remote option.

I've created a script to utilize Mozilla's remote capability.

If you have a different but compatible Mozilla browser, than you're still ok, because there's a switch available for you to override the Mozilla browser setting to use your Mozilla browser program instead. If something's wrong, then please email me to let me know what doesn't work for you.

As your root:

# mkdir /var/www/html/images ## web application images directory


> /var/www/html/images/ERMpowered.gif

# chmod a+r /var/www/html/images/ERMpowered.gif

# mkdir /var/www/cgi-bin/youtube

# mkdir /var/www/cgi-bin/youtube/tag


> /var/www/cgi-bin/youtube/tag/mozilla_tag.php

# chmod a+x /var/www/cgi-bin/youtube/tag/mozilla_tag.php

# mkdir /var/www/youtube

# mkdir /var/www/youtube/tag ## ( mozilla_tag.php --> ) control directory

# ln -s ~username/youtube /var/www/html/youtube

As your username:


> ~/youtube/tag/

$ chmod +x ~/youtube/tag/

my default browser:

$ ~/youtube/tag/tag.plx --yt_canon_tag=very_nbsp_hot_nbsp_girl --yt_mozilla

$ ~/youtube/tag/tag.plx --yt_canon_tag=very_nbsp_hot_nbsp_girl --yt_mozilla --yt_mozilla_bin=/usr/bin/firefox

select your alternative browser:

$ ~/youtube/tag/tag.plx --yt_canon_tag=very_nbsp_hot_nbsp_girl --yt_mozilla --yt_mozilla_bin=/usr/bin/mozilla

You should see something come up, after a short period of time, like your favorite web browser with a 'very hot girl' exposing herself somewhere in it.
The Mozilla tag agent script

Let's see what the script was created to do for you.

If you don't have Mozilla Firefox, then you'll need to edit the script to set it up for your Mozilla browser.

Find the line with "./tag.plx $CMD"

Change it to "./tag.plx $CMD --yt_mozilla_bin=/usr/bin/mozilla"

Where "/usr/bin/mozilla" is the absolutely correct path to your specific Mozilla browser.

Before we start the agent, let's take a look to see what is going on in the background.

I'm going to use /usr/bin/firefox here, but you should use your Mozilla browser instead.

As your username:

$ ( /usr/bin/firefox http://localhost/cgi-bin/youtube/tag/mozilla_tag.php 2>&1 ) > /dev/null &

I assume that the /var/www/youtube/tag directory is still empty.

$ ls -1 /var/www/youtube/tag

Yep, I think it's still unused.

Enter the Tag: very hot girl please, then press the Enter button.
Let's take a look at what happened, and why.

$ ls -1 /var/www/youtube/tag


Contents of tag.ctl:

--yt_mozilla --yt_canon_tag=very_nbsp_hot_nbsp_girl --ml_vlbt_want=all --ml_delay_sec=1 --ml_first_page=1 --ml_max_pages=2 --ml_per_page=6 --html_columns=3 --html_watch_size=large_window

NOTE: The canonical tag form is _nbsp_ for spaces, meaning "non-breaking" space, like   in html.


This is simply a touched null-file eventually to be renamed tag_very_nbsp_hot_nbsp_girl.please_delete_me to tell the script to remove the same named tag directory along with this tag directory control file.

Let's start your script to process that pending tag request in tag.ctl.

$ ~/youtube/tag/

We're done with the command line, so just watch the agent do its work for now.

TAG SETUP [2] for Apache httpd

This Apache setup is an EXPERIMENTAL setup (Considered a SECURITY RISK by SELinux).
So there may come a user named apache to play videos by 'tag' with you.
As your username:

$ chmod -R a+w ~/youtube/video

$ chmod a+w ~/youtube/tag

As your root:

# ln -s ~username/WWW /var/www/WWW

# ln -s ~username/youtube /var/www/html/youtube

As your username:


> ~/youtube/tag/apache_tag.php

$ chmod a+x ~/youtube/tag/apache_tag.php

$ GET http://localhost/youtube/tag/tag.php ## DOES THIS WORK FOR YOU NOW?

About my SELinux:

I currently have FC4 Linux, Apache 2.0, and I couldn't use perl, or or load at all.

My SELinux didn't allow me to run perl CGI scripts under Apache's httpd.

My SELinux didn't allow me to load into Apache's httpd in perl.conf.

My SELinux didn't allow me to use symbolic links under Apache's httpd directories.

My FC4 Linux 'Security Level Config' script is named /usr/bin/system-config-securitylevel.

I checked "Disable SELinux protection for httpd daemon," so that I could run perl CGI scripts.

I'm not happy with this SELinux configuation issue, since it's being considered an SELinux SECURITY RISK, so I developed TAG SETUP [1] for Mozilla Firefox Web Browser. Now I'm very happy. ( #; >#)##


What else is there to see, after seeing some 'very hot girl' on YouTube?

You asked...

WWW::YouTube WWW::YouTube::Com WWW::YouTube::ML WWW::YouTube::XML WWW::YouTube::HTML


Copyright (C) 2006 Eric R. Meyers <>

syntax highlighting: