hpricot won't scrape! (newb question)

Hey all! Just to preface, I am fairly new to RoR, and brand new to using hpricot.

I am using the following code to scrape this xpath: "/html/body/div/div[5]/div/div[2]/div[2]/div[2]"

from this url: "http://www.greatnonprofits.org/"

Here is my code to do so (taken from igvita.com's related blogpost):

Anyone know why this is happening? The code works with other urls/ xpaths. Can anyone specify for me whywww.greatnonprofits.comis different?

Well, just asking the stupid question: are you sure the html on that page matches the structure in that xpath ?

Fred

jrgoodner wrote:

Hey all! Just to preface, I am fairly new to RoR, and brand new to using hpricot.

I am using the following code to scrape this xpath: "/html/body/div/div[5]/div/div[2]/div[2]/div[2]"

from this url: "http://www.greatnonprofits.org/"

Switch to Nokogiri.