From: George Malamidis Date: 2007-06-10T21:36:48+09:00 Subject: Re: Problem with getting info from several websites Hello, Does this work for you? %w(rubygems hpricot open-uri).each { |e| require e } (1..10).each do |id| doc = Hpricot(open("http://www.securityfocus.com/bid/#{id}")) p (doc/'#vulnerability').inner_html end George On 10 Jun 2007, at 10:26, Tom Bombadil wrote: > Hi there, > > I'm trying to get data from a couple of websites at the same time > by using: > > (1..10).each { |p| print p} # should get the content from the > pages with > the id's 1 to 10... > > # load the Securityfocus home page (id 1 to start) > doc = Hpricot(open("http://www.securityfocus.com/bid/1 www.securityfocus.com/bid/715> > ")) > > # get the content of the div id ="vulnerability" > p =(doc/'#vulnerability').inner_html > > # prints div id = 'vulnerability' > puts p > > Must I use an array? > > Thanks, > Tom