0

Using the LinkedIn Scraper Gem and having some trouble with proxifying it. It works great on local and no problems at all, but in production, I keep getting redirected to the login page. Wanting to have it run through proxy, how do I do that?

When I make a regular HTTP request on my server:

Net::HTTP.get(URI.parse('http://www.linkedin.com/in/SOMETHING'))

I get

=> "<html><head>\n<script type=\"text/javascript\">\nwindow.onload = function() {\n  var domain = document.domain;\n  var newDomainIndex = 0;\n  if (domain.substr(0, 6) == \"touch.\") {\n    newDomainIndex = 6;\n  }\n  else if (domain.substr(0, 7) == \"tablet.\") {\n    newDomainIndex = 7;\n  }\n  if (newDomainIndex) {\n    domain = domain.substr(newDomainIndex);\n  }\n  window.location = \"https://\" + domain +  \"/uas/login?trk=sentinel_org_block&session_redirect=\" + encodeURIComponent(window.location);\n}\n</script>\n</head></html>\n" 

Thanks!

1 Answer 1

0

I also had a similar problem. As mention here, LinkedIn do not allow direct access. Most likely they have blocked your server's IP address. You will have to use their APIs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.