Linkedin-Scraper <img src=“http://travis-ci.org/jaimeiniesta/metainspector.png” />¶ ↑
Linkedin-scraper is a gem for scraping linkedin public profiles. You give it an URL, and it lets you easily get its title,name,country,area,current_companies .
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.
Initialize a scraper instance for an URL, like this:
profile = Linkedin::Profile.get_profile('http://in.linkedin.com/pub/yatish-mehta/22/460/a86')
Then you can see the scraped data like this:
profile.first_name #the First name of the contact profile.last_name #the last name of the contact profile.title #the linkedin job title profile.location #the location of the contact profile.country #the country of the contact profile.industry #the domain for which the contact belongs profile.past_companies #Array of hash containing its past job companies and job profile #Example # [ # [0] { # :past_company => "Consumyze Software", # :past_title => "Trainee", # :past_company_website => "http://www.consumyze.com", # :description => "Responsible for design and development" # }, # [1] { # :past_company => "SunGard Global Services", # :past_title => "Project Intern", # :past_company_website => "http://www.sungard.com/globalservices/learnmore", # :description => "Fame PassPoint. Developed an entirely Ajax based online control panel for user management and Data access for Fame" # } # ] profile.current_companies #Array of hash containing its current job companies and job profile #Example # [ # [0] { # :current_title => "Intern", # :current_company => "Sungard" # :current_company_url=>"http://www.betterlabs.net", # :description=>"Responsible for design and development of projects on Ruby on Rails." # }, # [1] { # :current_title => "Software Developer", # :current_company => "Microsoft" # :current_company_url =>"http://www.microsoft.net", # :description =>"Development and design" # } # ] profile.linkedin_url #url of the profile profile.websites #Array of websites #[ # [0] "http://www.yatishmehta.in" #] profile.groups #Array of hashes containing group name and link # [ # [ 0] { # :name => "Business on Rails", # :link => "http://www.linkedin.com/groups/Business-on-Rails-27822" # }, # [ 1] { # :name => "HTML5 Technologies", # :link => "http://www.linkedin.com/groups/HTML5-Technologies-2868882" # }, # [ 2] { # :name => "India on Rails", # :link => "http://www.linkedin.com/groups/India-on-Rails-149940" # }, # [ 3] { # :name => "Open Source", # :link => "http://www.linkedin.com/groups?gid=43875" # }, # [ 4] { # :name => "Rails Developers", # :link => "http://www.linkedin.com/groups?gid=77764" # }, # ] profile.education #Array of hashes for eduction # [ # [0] { # :name => "Vishwakarma Institute of Technology", # :description => "B.Tech, Computer Engineering", # :period => "2007 – 2011" # }, # [1] { # :name => "St Ursula's High School", # :description => "Secondary School Education", # :period => nil # } # ] profile.recommended_visitors #Its the list of visitors "Viewers of this profile also viewed..." #attr_accessor :recommended_visitors = [ # [0] { # :link => href="http://in.linkedin.com/in/nileshavhad?trk=pub-pbmap", # :name => "Nilesh Avhad", # :title => "Engineering Manager", # :company => "Better Labs" # },
You’re welcome to fork this project and send pull requests. I want to thank specially:
* Copyright © 2009-2012 Yatish Mehta, released under the MIT license