From: Tom Bombadil Date: 2007-06-08T20:57:36+09:00 Subject: Re: Problem with getting info from several websites ------=_Part_70421_20684903.1181303856850 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline First of all I'd like to apologize. Got a bit confused myself as I received various different answers to my questions... Thus, I now have the html of content I'm interested in for a single id (715). 2 questions: 1) How can I get the html for all the id's on www.securityfocus.com/bid/? Something like: securityfocus_data = Scrubyt::Extractor.define do (1..10) # as a test only for the id's 1 to 10 fetch("www.securityfocus.com/bid") ... link("/html/body/div/div/a") do url("href", { :type => :attribute }) end next_page("Next", { :limit => 10 }) end 2) How can I create a text file out of this html using hpricot if possible so that I have something like: Title: Berkeley Sendmail Group Permissions Vulnerability Bugtraq ID: 715 Class: Access Validation Error ... May I use something like: (doc/:result).each do |el| title = (el/:title).text Thanks, Tom -- On 6/8/07, Peter Szinek wrote: > > Tom. > > Man, you are mixing pure Hpricot and scRUBYt! together - This syntax: > > > securityfocus_data.to_xml.write($stdout, 1) > > is from scRUBYt!, but you are gathering the data with Hpricot - how > would you like to pull this off? > Maybe I don't get something, but I am a bit confused... > > Cheers, > 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. > > > ------=_Part_70421_20684903.1181303856850--