Forum: Ruby Need Help in Aol Login with mechanize

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8cfe005cf0ae68ce44884af682a8e0a3?d=identicon&s=25 Md.elme focruzzaman Shuvo (shuvo)
on 2007-06-17 15:16
Hello There,

I am tring to develop an aotometed login script for
in ruby.For this purpose I am using mechanize. my code is given bellow:

require 'rubygems'; require 'mechanize'

agent =
#agent.user_agent_alias = 'Windows IE 6'
page = agent.get('')
page = agent.get('')
url= url[0..url.index('"')-1]

frm = page.forms[0]
frm.loginId=#'Aol user name'
frm.password=#'Aol Password'
page = agent.submit(frm)
url =
puts url

page =agent.get(url)
puts page.body


but the the page body is gives me the error page. I think it misses some
cookies. But I am not so familier with mechanize's cookie issue. Is the
any boby who can help me? Please help me with iths issue.

This topic is locked and can not be replied to.