Perl class to remove HTML tags from a page using a list of CSS selectors?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I have Squid (a proxy server) on my computer and I use it as an ad
filter (like AdBlock, AdSweep or Privoxy). Every HTML page that I
download from my browser, goes through Squid that in turn sends it to
a Perl script that can alter content from the page and send it back
once changed.

I was wondering if there is a Perl class that exists and that I could
use to take CSS selectors (e.g. #bannerad, div.adsense), search for
each of those selectors inside the HTML page, remove them (and all
child nodes), and return the cleaned page.


Site Timeline