yatish27 / linkedin-scraper

Scrapes the public profile of the linkedin page
MIT License
552 stars 221 forks source link

Groups gives an empty set back #43

Closed mlieber closed 9 years ago

mlieber commented 9 years ago

Hi,

it seems like the groups section doesn't work anymore, it always return an empty set. Tried corrected code to:

  @groups ||= @page.search('#groups .groups-name').map do |item|
    name = item.text.gsub(/\s+|\n/, ' ').strip if item.at('strong')

    { :name => name }
  end

Not working so far .. thanks

yatish27 commented 9 years ago

Please check if you can see the groups in the public profile(without signing up). I checked and it is working. If possible can you paste the link and rawhtml

mlieber commented 9 years ago

Yatish, thanks but i am not following - if i log out of Linkedin and go to https://www.linkedin.com/in/jeffweiner08 , i cannot see his groups; i only see them when i log in. Either way when i run the code from my machine, it doesn't utilize the cookies from the browser to know whether I am logged in or not to LI (and i tried either way);

$ linkedin-scraper http://www.linkedin.com/in/jeffweiner08 i always get: ... "picture": "https://media.licdn.com/mpr/mpr/shrink_200_200/p/6/005/07c/31e/153cdd3.jpg", "linkedin_url": "http://www.linkedin.com/in/jeffweiner08", "education": [

], "groups": [

], "websites": [ "http://www.linkedin.com/" ], "languages": [

], ..

thanks, Matt

yatish27 commented 9 years ago

This code works only for public profiles, So it won't work if you can't see the details in public view. It collects only public profile details