Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Need Help in Aol Login with mechanize
Md.elme focruzzaman Shuvo
6/17/2007 1:17:00 PM
Hello There,
I am tring to develop an aotometed login script for
http://w...
in ruby.For this purpose I am using mechanize. my code is given bellow:
--------------------------------------------------------------------
require 'rubygems'; require 'mechanize'
agent = WWW::Mechanize.new
#agent.user_agent_alias = 'Windows IE 6'
page = agent.get('
http://w...
')
page = agent.get('
http://webmail.ao...
)
url=page.body[page.body.index('
https://my.screenname.aol.com/_cqr/login/logi...
)..page.body.length]
url= url[0..url.index('"')-1]
page=agent.get(url)
frm = page.forms[0]
frm.loginId=#'Aol user name'
frm.password=#'Aol Password'
page = agent.submit(frm)
url =
page.body[page.body.index('
http://webmail.aol.com/_cqr/LoginSuccess...
)..page.body.length]
url=url[0..url.index("'")-1]
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.
Regards,
Shuvo.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Need Help in Aol Login with mechanize
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password