Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl class to remove HTML tags from a page using a list of CSSselectors?

Reply
Thread Tools

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

 
 
Charles L.
Guest
Posts: n/a
 
      03-23-2009
Hello,

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.

Thanks,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
All style tags after the first 30 style tags on an HTML page are not applied in Internet Explorer Rob Nicholson ASP .Net 3 05-28-2005 03:11 PM
Remove HTML tags (except anchor tag) from a string using regularexpressions Nico Grubert Python 4 02-02-2005 06:43 PM
Remove javascript content from HTML page using Perl Mark Perl 1 08-12-2004 06:20 PM
remove all html tags by perl jjliu Perl 5 10-15-2003 12:44 AM
How to use HTML::Parser to remove HTML tags and print result Mitchua Perl 1 07-15-2003 02:02 PM



Advertisments