linkedin_scraper icon indicating copy to clipboard operation
linkedin_scraper copied to clipboard

Trying to scrape emplyees of a company always returns a list of None's

Open aradzekler opened this issue 4 years ago • 6 comments

No error or anything, just doesnt seem to work on employees, anyone succedded in scraping employees from company?

aradzekler avatar Apr 20 '21 11:04 aradzekler

Do you have code on how you're trying to do it?

joeyism avatar Apr 20 '21 18:04 joeyism

same as the latest fork, the company line itself is:

company = Company(row['linkedin_profile_generic'], driver=self.driver,
    close_on_complete=False, get_employees=True)
input_df.at[0, 'employees'] = company.employees

outputs: [None, None]

aradzekler avatar Apr 21 '21 06:04 aradzekler

I ran this code

import os
from linkedin_scraper import Person, Company, actions
from selenium import webdriver
driver = webdriver.Chrome("./chromedriver")
actions.login(driver, os.getenv("LINKEDIN_USER"), os.getenv("LINKEDIN_PASSWORD"))
company = Company("https://www.linkedin.com/company/pinnacle-west-capital-corporation/", get_employees=True, driver=driver)
print(company)

then when I ran

len(company.employees)

I get Screenshot from 2021-04-21 20-03-14

joeyism avatar Apr 21 '21 18:04 joeyism

I get a list the size of the company employees but the list contains only None's

aradzekler avatar Apr 22 '21 06:04 aradzekler

Screenshot from 2021-05-02 00-31-36

Some of them may be None if it can't scrape it, but there are definitely some there.

The details aren't filled out because this is scrapped just from the company's employees list, which doesn't contain much info. If you want to get more details, you'll have to loop over the employees and scrape each one.

joeyism avatar May 01 '21 22:05 joeyism

When I scrape each person separately I get a result like your image over there with all fields as empty lists. Any ideas how to fix this?

ErlingLie avatar Sep 26 '22 15:09 ErlingLie