Hello,

    I'm trying to use open-uri on yahoo mail's login page.  If I do the
following:

#!/usr/bin/env ruby

require 'open-uri'
require 'uri'

f = open("http://mail.yahoo.com")

--------

    I get the following error:

/usr/lib/ruby/1.8/open-uri.rb:174:in `open_loop': redirection forbidden:
http://mail.yahoo.com/ ->
https://login.yahoo.com/config/login_verify2?&.src=ym (RuntimeError)
        from /usr/lib/ruby/1.8/open-uri.rb:132:in `open_uri'
        from /usr/lib/ruby/1.8/open-uri.rb:528:in `open'
        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

-- 
Posted via http://www.ruby-forum.com/.