Re: [R] Scrap java scripts and styles from an html document

From: antujsrv <>
Date: Thu, 07 Apr 2011 04:15:50 -0700 (PDT)

Hi ,

I am working on developing a web crawler. Removing javascripts and styles is a part of the cleaning of the html document.
What I want is a cleaned html document with only the html tags and textual information,
so that i can figure out the pattern of the web page. This is being done to extract relevant
information from the webpage like comments for a particular product.

For e.g the has all such comments within the  and tags,
with regular
 occuring for breaks. So tags which appear the most help us in  locating the required information. Different websites have different patterns,
but its more likely that tags that will occur the most will have the relevant information enclosed in them.

So, once the html page is cleaned, it would be easy to role up the tags and knowing their frequency of occurrence, we can target the information.

Should there be any suggestions to help, please let me know. I would be more than pleased.


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 07 Apr 2011 - 11:48:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Apr 2011 - 15:30:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive