Linkedin Scraper is a gem for finding linkedin public profiles. You give it name and company of required profile, it finds linkedin profile for same, and its title, name, area, connection, etc.
Install the gem from RubyGems:
gem install linkedin_scraper
This gem is tested on Ruby versions 1.8.7, 1.9.2 and 1.9.3.
First Initialize an instance Linkedin class like this:
require 'linkedin_scraper' linkedin = LinkedinScraper::Linkedin.new
This sets the mechanize object for scraping. Now you can feed name and companies:
profile = linkedin.get_profile_data(name: some_name, company: some_company)
third option can be country: some_country (see list of supported countries below)
# List of supported countries 1) United States - country: “us” 2) United Kingdom - country: “uk” 3) Canada - country: “ca” 4) India - country: “in”
Then you can see the scraped data like this:
profile.full_name #the full name of the profile profile.title #the linkedin job title profile.location #the location of the prfile profile.connection # number of connection of profile profile.linkedin_url #url of the profile
Copyright © 2012 Bhushan Lodha, released under the MIT license.