From: Jim Freeze Date: 2002-09-26T11:09:14+09:00 Subject: Re: http/net On Thu, Sep 26, 2002 at 06:18:24AM +0900, GOTO Kentaro wrote: > At Thu, 26 Sep 2002 05:47:19 +0900, > Jim Freeze wrote: > > Is there way to automatically get the frame documents, or do > > I have to search the returned text and filter out the > > new paths? > > You can pick up values of SRC from html as follows: > > html = .... > > require "uri" > current_uri = URI.parse("http://xyz.mycompany.com:3000/scripts/isynch.dll") > > pattern = /|<.+?>|[^<>]+/m > href = /href\s*=\s*"(.+?)"/im > frame = html.scan(pattern).grep(/^<\s*frame\s+.*src=/i).map{|src| > /src="(.+?)"|src=([^\s>]+)/i.match(src) > current_uri.merge($1 || $2) > } > p frame > > -- Gotoken Ok, thanks. Now frame has the value: [#, #, #] ...but, sorry to say, I am still a big dummy with regards to net/http. Is there a way to directly use a uri to get the page data? Thanks -- Jim Freeze ---------- Programming Ruby def initialize; fun; end A language with class