From: Peter Szinek Date: 2007-04-19T04:28:40+09:00 Subject: Re: Hpricot getting a table lrlebron@gmail.com wrote: > I am currently trying to scrape some data from the following web page > > I am using some hpricot code that looks like this > @doc = Hpricot(open(strLink)) > > @doc.search("/html/body/table[5]/tr/td[2]/div[3]/table/tr/td/div[1]/ > table") do |data| > puts data > end > > At this point data contains html that looks like this > >
Stuff
Stuff
>
Stuff
Stuff
>
Stuff
Stuff
>
Stuff
Stuff
> > More stuff continues ...... > > I want capture each of these four tables individually for further > processing. I have tried a variety of methods but nothing seems to > work. What are you trying to do exactly? What should be the result? Could you please provide some real data, because these 'stuff' do not make too much sense :-) Thanks, Peter __ http://www.rubyrailways.com :: Ruby and Web2.0 blog http://scrubyt.org :: Ruby web scraping framework http://rubykitchensink.ca/ :: The indexed archive of all things Ruby