From: Tom Bombadil Date: 2007-06-08T16:32:04+09:00 Subject: Re: Problem with getting info from several websites ------=_Part_68352_7035895.1181287924621 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline George, Thanks, however p (doc/'#vulnerability') still delivers me the whole site... i only need the content of the div id = "vulnerability". How to proceed with that? So long, Tom -- On 6/7/07, George Malamidis wrote: > > Hi, > > Is something like this what you have in mind? > > doc = Hpricot(open("http://www.securityfocus.com/bid/715")) > p (doc/'#vulnerability') > > George > > > > On 7 Jun 2007, at 16:28, Tom Bombadil wrote: > > > Hi there, > > > > The code below provides me the html for a specific id of the site: > > www.securityfocus.com What I'm trying to do is: Getting the info of > > the div > > id ="vulnerability" only, but for all the different id's available - > > currently around 25000. I think it is something like: next_page > > 'Next'>', > > :limit => 25000 but where do I need to put it and how can I get the > > div id > > info only? I appreciate your help. > > > > require 'rubygems' > > require 'hpricot' > > require 'open-uri' > > > > # load the Securityfocus home page (id 715 to start) > > doc = Hpricot(open("http://www.securityfocus.com/bid/715")) > > > > # print the altered HTML > > puts doc > > > > > > -tom > > > ------=_Part_68352_7035895.1181287924621--