From: George Malamidis Date: 2007-06-12T00:41:26+09:00 Subject: Re: Problem with getting info from several websites Hello, (1..10).each do |id| doc = Hpricot(open("http://www.securityfocus.com/bid/#{id}")) File.open("#{id}.txt", "w") do |f| f << (doc/'#vulnerability').inner_html end end Should write every page to a different file. You can use stuff like gsub to replace/remove any unwanted characters. George On 11 Jun 2007, at 13:44, Tom Bombadil wrote: > Indeed, I appreciate!! I have actually 2 more questions regarding this > topic. Thus, > 1) I'd like to either create a .txt or .xml file for each id. Can I > go ahead > and use aFile = File.new("bid.txt", "w") and aFile.close? > 2) How can I chomp the \n and \t characters in the terminal output? > I only > need the text w/o tags. Best on separate lines... > I owe you a pitcher :-)