From: Dido Sevilla Date: 2007-11-21T16:34:44+09:00 Subject: Re: Copy image from a website On Nov 20, 2007 2:00 AM, _Stud wrote: > I'm trying to copy an image from a website, but can't seem to get it > right. > > I know rio can copy a website in one line, but what about images? > Anyone have a good snippet using open-uri or something? Using mechanize: require 'mechanize' agent = WWW::Mechanize.new img = agent.get("http://www.example.com/image.jpg") img.save will load the JPEG image image.jpg from the site www.example.com and save it as image.jpg on the local filesystem. -- 普通じゃないのが当然なら答える私は何ができる? 普通でも普通じゃなくて感じるまま感じることだけをするよ! http://stormwyrm.blogspot.com