using proHTML scraping text
in
Contributed Library Questions
•
6 months ago
Hi,
I'm a new programmer, so please excuse my poor use of language.
I'm trying to scrape specific HTML text off an URL.
My strategy is (was) to use the proHTML library, from which I am able to create a 'List" of all the page elements and text (language?). I then want to convert that List into a String, so I can split the List and retrieve my specific text that I'm after (I'm assuming I need to convert List to String - I just don't know how to do this, or if there is another way around this).
Thanks for your help/suggestions.
dan
Code:
-
import prohtml.*;
HtmlList htmlList;
void setup(){size(100,100);//enter your url herehtmlList = new HtmlList("http://www.lyricfind.com/services/lyrics-search/try-our-search/?q=ape+punch+run");
for (int i = 0;i<htmlList.pageList.size();i++){// println(htmlList.pageList.get(i));//toString(htmlList.pageList);//String htmlJunk = htmlList.pageList;//String [] list1 = split(htmlJunk,"<h2>");println(htmlList.pageList);}}
1