Hi folks, this week I'm having problems logging in LinkedIn using ruby mechanize. My code is as follows:
agent = WWW::Mechanize.new
home_page = agent.get('http://www.linkedin.com')
sign_in_link = home_page.links.find{|link| link.text == "Sign In"}
login_form = sign_in_link.click.form('login')
# with email and password variables properly set
login_form.set_fields(:session_key => email, :session_password => password)
return_page = agent.submit(login_form, login_form.buttons.first)
Last week it worked OK but now it's failing, the return_page variable shows a 'redirecting...' message but when I use the same agent to fetch 'http://www.linkedin.com/home', it's as if I've never signed in (although cookies show otherwise). Can someone try to duplicate this error?
Thanks in advance.