From: Jonathan Nichols Date: 2007-06-04T05:34:48+09:00 Subject: Re: Problem with open-uri Hi Todd, Thanks for the quick response. Unfortunately, I need to have the ability to take a simple uri and follow the redirections. open-uri works for some uris, but not for yahoo for some reason. If you do open("https://mail.google.com"), it will follow the redirects and successfully download the html at the redirected uri, which is https://www.google.com/accounts/ServiceLogin. this looks like a bug in open-uri to me, as mechanize (and firefox) is able to follow the redirects for yahoo. I can't find a way to report bugs for open-uri. Anybody know how to do this? Regards, jon Todd Benson wrote: > On 6/3/07, Jonathan Nichols wrote: >> f = open("http://mail.yahoo.com") >> from /usr/lib/ruby/1.8/open-uri.rb:30:in `open' >> from ./readForms.rb:11 >> >> ------- >> >> I've tried to use mechanize instead, but I can't seem to figure out >> how to emulate the base_uri functionality in open-uri. Any ideas? >> >> Regards, >> >> jon > > You're being redirected. Try the redirect url (and you can leave the > ?&.src=ym off depending on what you want to do) > > require 'open-uri' > document = open( "https://login.yahoo.com/config/login_verify2" ).read -- Posted via http://www.ruby-forum.com/.