« Return to Thread: Get a web page with open-uri

Re: Get a web page with open-uri

by Andrew Timberlake-2 :: Rate this Message:

Reply to Author | View in Thread

On Wed, Jul 8, 2009 at 11:52 AM, Andy P.<andycootlapin@...> wrote:
> require 'open-uri'
> open("http://www.google.com") {|src|
>  open("test.htm","wb") {|dst|
>      dst.write(src.read)
>  }
> }

Andy

Pasted the code directly into irb and it worked perfectly.

Andrew Timberlake
http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings

 « Return to Thread: Get a web page with open-uri