1

I'm looking to pull the exact employee count for a given company on LinkedIn. From what I have found, this data is not accessible through the API or on the public site, so the only remaining option I see is to programmatically authenticate and scrape the company page for logged-in users. Anyone have other ideas or know how to do that?

Thanks for the help in advance!

4

3 回答 3

1

如果您一心想通过抓取网站来获得准确的数字,那么到目前为止,最简单的方法是使用Python 中的BeautifulSoup。简而言之,您给它一个网址,它会将所有数据以易于遍历的对象的形式返回给您。

对于员工数量,取决于一个人的公司信息显示在哪里,它可以简单到给它所有你想检查的人,然后做

All_Companies[body.companyDiv.companyName]++

我真的希望这对你有帮助。

于 2012-08-20T19:44:53.057 回答
0

您将从 LinkedIn 获得的最好的东西是通过Company API<employee-count-range>的元素。其值的图例如下:

A = 1
B = 2-10
C = 11-50
D = 51-200
E = 201-500
F = 501-1000
G = 1001-5000
H = 5001-10000
I = 10001+
于 2012-08-20T08:51:49.187 回答
0
LinkedInApiClientFactory mfactory = LinkedInApiClientFactory.newInstance(Constants.consumerKey, Constants.consumerSecret);
        CompaniesApiClient clientcompany = mfactory.createCompaniesApiClient(Constants.token, Constants.tokenSecret);
        Company company = clientcompany.getCompanyById("YOUR PAGE ID", EnumSet.allOf(CompanyField.class));
if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("A")) {
       System.out.println("-->Emplyee count--"+"1");
    }else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("B")) {
         System.out.println("-->Emplyee count--"+"2-10");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("C")) {
         System.out.println("-->Emplyee count--"+"11-50");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("D")) {
         System.out.println("-->Emplyee count--"+"51-200");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("E")) {
         System.out.println("-->Emplyee count--"+"201-500");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("F")) {
         System.out.println("-->Emplyee count--"+"501-1000");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("G")) {
         System.out.println("-->Emplyee count--"+"1001-5000");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("H")) {
         System.out.println("-->Emplyee count--"+"50001-10000");
    }
    else if (company.getEmployeeCountRange().getCode().equalsIgnoreCase("H")) {
     System.out.println("-->Emplyee count--"+"10000 and above");
   }
于 2015-03-18T08:57:19.767 回答