Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 709267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:29:06+00:00 2026-05-14T04:29:06+00:00

this week I’m having problems logging in LinkedIn using ruby mechanize. My code is

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:29:06+00:00Added an answer on May 14, 2026 at 4:29 am

    In our case we succeded using curl inside our controller, here is a snippet of what we do, we do a curl call to log in and store the cookies in a file named j and then use it for every subsequent request, hacky but works in the meantime.

     curl_login = `curl --cookie-jar j -so/dev/null -Fsession_login= -Fsession_rikey= -Fsession_key=#{contact} -Fsession_password=#{password} https://www.linkedin.com/secure/login?trk=hb_signin`
    
     curl_for_profile = `curl --cookie j "#{profile_url}"`
    

    Let me know if you have any question

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I easily get Week Number using MySql Week function like this WEEK(SYSDATE()) I just
We have been having some debate this week at my company as to how
This week I decided to add a new element to a javascript array by
Some background: I setup six blogs this week, all using Wordpress 2.92, installed with
I'm writing code this week to dynamically change the color of images. As long
I've started a new job this week and am trying to get my head
I am new to this and have searched a lot this week. I am
I'm very new to all this (started this week), so be kind :) I
I've done a small mistake while coding this week-end. In the following code, I'm
this week I participated a presentation of the 2008 TFS. Currently we are using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.