[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

screen scraping using htmltools and rexml

bodikp.archive@gmail.com

1/21/2006 10:51:00 PM

Hi,
I need to do some screen scraping and I've spent a couple hour getting
htmltools and rexml do the right thing. Here's the code:

parser = HTMLTree::Parser.new(false, false)
parser.feed(res.body)
tree = parser.tree.html_node.as_rexml_document

I works for one page, but for another I get "undefined method `add' for
#<HTMLTree::Element:0x37f9cc8>" in as_rexml_document

It seems like a library mismatch, but I just downloaded ruby and all
the libraries in the past couple days. Does anybody know what versions
I need to make this work?

Thanks a lot!
Peter