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

Discussion in 'Perl Misc' started by Charles L., Mar 23, 2009.

  1. Charles L.

    Charles L. Guest


    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.

    Charles L., Mar 23, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.