Skip to content

Instantly share code, notes, and snippets.

@jonhinson
Created March 19, 2010 20:03
Show Gist options
  • Select an option

  • Save jonhinson/338113 to your computer and use it in GitHub Desktop.

Select an option

Save jonhinson/338113 to your computer and use it in GitHub Desktop.
agent = WWW::Mechanize.new
agent.user_agent_alias = 'Mac FireFox'
page = agent.get('https://www.linkedin.com/secure/login')
page = page.form_with(:name => 'login') do |f|
f.session_key = "example@example.com"
f.session_password = "notreal"
end.submit
page = agent.get('http://www.linkedin.com/home')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment