GithubHelp home page GithubHelp logo

lucabongiorni / linkedin-scraper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yatish27/linkedin-scraper

0.0 2.0 0.0 742 KB

Scrapes the public profile of the linkedin page

License: MIT License

Ruby 100.00%

linkedin-scraper's Introduction

Build Status Gem Version

Linkedin Scraper

Linkedin-scraper is a gem for scraping linkedin public profiles. Given the URL of the profile, it gets the name, country, title, area, current companies, past companies, organizations, skills, groups, etc

Installation

Install the gem from RubyGems:

gem install linkedin-scraper

This gem is tested on 1.9.2, 1.9.3, 2.0.0, JRuby1.9, rbx1.9,

Usage

Initialize a scraper instance

profile = Linkedin::Profile.get_profile("http://www.linkedin.com/in/jeffweiner08")

The returning object responds to the following methods

profile.first_name          # The first name of the contact

profile.last_name           # The last name of the contact

profile.name                # The full name of the profile

profile.title               # The job title

profile.summary             # The summary of the profile

profile.location            # The location of the contact

profile.country             # The country of the contact

profile.industry            # The domain for which the contact belongs

profile.picture             # The profile picture link of profile

profile.skills              # Array of skills of the profile

profile.organizations       # Array organizations of the profile

profile.education           # Array of hashes for education

profile.websites            # Array of websites

profile.groups              # Array of groups

profile.languages           # Array of languages

profile.certifications      # Array of certifications

profile.number_of_connections # The number of connections as a string

For current and past companies it also provides the details of the companies like company size, industry, address, etc

profile.current_companies

[
[0] {
         :current_company => "LinkedIn",
           :current_title => "CEO",
     :current_company_url => "http://www.linkedin.com",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/linkedin?trk=ppro_cprof",
                     :url => "http://www.linkedin.com",
                    :type => "Public Company",
            :company_size => "1001-5000 employees",
                 :website => "http://www.linkedin.com",
                :industry => "Internet",
                 :founded => "2003",
                 :address => "2029 Stierlin Court  Mountain View, CA 94043 United States"
},
[1] {
         :current_company => "Intuit",
           :current_title => "Member, Board of Directors",
     :current_company_url => "http://network.intuit.com/",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/intuit?trk=ppro_cprof",
                     :url => "http://network.intuit.com/",
                    :type => "Public Company",
            :company_size => "5001-10,000 employees",
                 :website => "http://network.intuit.com/",
                :industry => "Computer Software",
                 :founded => "1983",
                 :address => "2632 Marine Way  Mountain View, CA 94043 United States"
},
[2] {
         :current_company => "DonorsChoose",
           :current_title => "Member, Board of Directors",
     :current_company_url => "http://www.donorschoose.org",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/donorschoose.org?trk=ppro_cprof",
                     :url => "http://www.donorschoose.org",
                    :type => "Nonprofit",
            :company_size => "51-200 employees",
                 :website => "http://www.donorschoose.org",
                :industry => "Nonprofit Organization Management",
                 :founded => "2000",
                 :address => "213 West 35th Street 2nd Floor East New York, NY 10001 United States"
},
[3] {
        :current_company => "Malaria No More",
          :current_title => "Member, Board of Directors",
    :current_company_url => nil,
            :description => nil
},
[4] {
         :current_company => "Venture For America",
           :current_title => "Member, Advisory Board",
     :current_company_url => "http://ventureforamerica.org/",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/venture-for-america?trk=ppro_cprof",
                     :url => "http://ventureforamerica.org/",
                    :type => "Nonprofit",
            :company_size => "1-10 employees",
                 :website => "http://ventureforamerica.org/",
                :industry => "Nonprofit Organization Management",
                 :founded => "2011"
}
]


profile.past_companies
[
[0] {
            :past_company => "Accel Partners",
              :past_title => "Executive in Residence",
    :past_company_website => "http://www.facebook.com/accel",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/accel-partners?trk=ppro_cprof",
                     :url => "http://www.facebook.com/accel",
                    :type => "Partnership",
            :company_size => "51-200 employees",
                 :website => "http://www.facebook.com/accel",
                :industry => "Venture Capital & Private Equity",
                 :address => "428 University Palo Alto, CA 94301 United States"
},
[1] {
            :past_company => "Greylock",
              :past_title => "Executive in Residence",
    :past_company_website => "http://www.greylock.com",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/greylock-partners?trk=ppro_cprof",
                     :url => "http://www.greylock.com",
                    :type => "Partnership",
            :company_size => "51-200 employees",
                 :website => "http://www.greylock.com",
                :industry => "Venture Capital & Private Equity",
                 :address => "2550 Sand Hill Road  Menlo Park, CA 94025 United States"
},
[2] {
            :past_company => "Yahoo!",
              :past_title => "Executive Vice President Network Division",
    :past_company_website => "http://www.yahoo.com",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/yahoo?trk=ppro_cprof",
                     :url => "http://www.yahoo.com",
                    :type => "Public Company",
            :company_size => "10,001+ employees",
                 :website => "http://www.yahoo.com",
                :industry => "Internet",
                 :founded => "1994",
                 :address => "701 First Avenue  Sunnyvale, CA 94089 United States"
},
[3] {
            :past_company => "Windsor Media",
              :past_title => "Founding Partner",
    :past_company_website => nil,
             :description => nil
},
[4] {
            :past_company => "Warner Bros.",
              :past_title => "Vice President Online",
    :past_company_website => "http://www.warnerbros.com/",
             :description => nil,
    :linkedin_company_url => "http://www.linkedin.com/company/warner-bros.-entertainment-group-of-companies?trk=ppro_cprof",
                     :url => "http://www.warnerbros.com/",
                    :type => "Public Company",
            :company_size => "10,001+ employees",
                 :website => "http://www.warnerbros.com/",
                :industry => "Entertainment",
                 :address => "4000 Warner Boulevard  Burbank, CA 91522 United States"
}
]


profile.recommended_visitors
#It is the list of visitors "Viewers of this profile also viewed..."
[
[0] {
       :link => "http://www.linkedin.com/in/barackobama?trk=pub-pbmap",
       :name => "Barack Obama",
      :title => "President of the United States of ",
    :company => nil
},
[1] {
       :link => "http://www.linkedin.com/in/marissamayer?trk=pub-pbmap",
       :name => "Marissa Mayer",
      :title => "Yahoo!, President & CEO",
    :company => nil
},
[2] {
       :link => "http://www.linkedin.com/pub/sean-parker/0/1/826?trk=pub-pbmap",
       :name => "Sean Parker",
      :title => nil,
    :company => nil
},
[3] {
       :link => "http://www.linkedin.com/pub/eduardo-saverin/0/70a/31b?trk=pub-pbmap",
       :name => "Eduardo Saverin",
      :title => nil,
    :company => nil
},
[4] {
       :link => "http://www.linkedin.com/in/rbranson?trk=pub-pbmap",
       :name => "Richard Branson",
      :title => "Founder",
    :company => "Virgin Group"
},
[5] {
       :link => "http://www.linkedin.com/in/reidhoffman?trk=pub-pbmap",
       :name => "Reid Hoffman",
      :title => "Entrepreneur. Product Strategist.  ",
    :company => nil
},
[6] {
       :link => "http://www.linkedin.com/in/mdell?trk=pub-pbmap",
       :name => "Michael Dell",
      :title => "Chairman and CEO",
    :company => "Dell"
},
[7] {
       :link => "http://www.linkedin.com/in/mittromney?trk=pub-pbmap",
       :name => "Mitt Romney",
      :title => "Believe in America",
    :company => nil
},
[8] {
       :link => "http://www.linkedin.com/pub/sheryl-sandberg/2/665/512?trk=pub-pbmap",
       :name => "Sheryl Sandberg",
      :title => nil,
    :company => nil
}
]

The gem also comes with a binary and can be used from the command line to get a json response of the scraped data. It takes the url as the first argument.

linkedin-scraper http://www.linkedin.com/in/jeffweiner08

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yatish27/linkedin-scraper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

linkedin-scraper's People

Contributors

yatish27 avatar stifitman avatar jgrevich avatar devadigayatish avatar prabhpreet avatar prathamesh-sonpatki avatar francesc avatar vpoola88 avatar kimlima avatar hilben avatar cernyjakub avatar anisharamnani avatar aupond avatar omertu avatar sagarjunnarkar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.