Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Scrapes the public profile of the linkedin page

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 linkedin-scraper.gemspec
README.rdoc

Linkedin-Scraper

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 .

Installation

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.

Usage

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_title => "Intern",
#        :past_company => "Sungard"
#        },
#    [1] {
#          :past_title => "Software Developer",
#        :past_company => "Microsoft"
#        }
#  ]
profile.current_companies
#Array of hash containing its current job companies and job profile
#Example
#  [
#    [0] {
#          :current_title => "Intern",
#        :current_company => "Sungard"
#        },
#    [1] {
#          :current_title => "Software Developer",
#        :current_company => "Microsoft"
#        }
#  ]

profile.linkedin_url        #url of the profile

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"
#    },

ZOMG Fork! Thank you!

You're welcome to fork this project and send pull requests. I want to thank specially:

To Do

* Copyright © 2009-2012 Yatish Mehta, released under the MIT license

Something went wrong with that request. Please try again.