python - 领英公司搜索 API : Get All Counts

标签 python linkedin

我需要获取 Linkedin 上尽可能多的上市公司的员工规模范围。我使用 Python,获得了 LinkedIn API。

但是,查询只返回前 10 个计数。您如何获得返回所有列出的计数的查询?

application = linkedin.LinkedInApplication(authentication)
application.search_company(selectors=[{'companies': ['name', 'employee-count-range']}])

结果:只有 10 家公司列在输出中。如何获取所有公司?

最佳答案

根据 LinkedIn API Documentation

count: The number of jobs to return. Values can range between 0 and 110. The default value is 10. The total results available to any user depends on their account level.

并根据Python LinkedIn Documentation示例(尽管这不是 search_company,而是 search_job 方法,此解决方案也适用于 search_company):

application.search_job(selectors=[{'jobs': ['id',
                                            'customer-job-code',
                                            'posting-date']}],
                       params={'title': 'python', 'count': 2})
# Output
{u'jobs': {u'_count': 2,
  u'_start': 0,
  u'_total': 206747,
  u'values': [{u'customerJobCode': u'0006YT23WQ',
    u'id': 5174636,
    u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}},
   {u'customerJobCode': u'00023CCVC2',
    u'id': 5174634,
    u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}}]}}

您应该使用 count 键传递 params 字典。

关于python - 领英公司搜索 API : Get All Counts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25558963/

相关文章:

android - 已签名的 apk 中的 Linkedin 集成错误

algorithm - 计算两个用户之间的社交距离

python - Python 中的蒙特卡罗模拟 : How to get exactly identical transition probabilities from modeled data?

python - 如何在循环列表本身时删除列表元素而不复制它

python - 如何合并这两个DataFrame

python - Pandas :按最大值分组和对组求和的最快方法

python - 如何 scrapy 处理 dns 查找失败

node.js - 如何使 Linkedin Rest API 请求 Node 方式(没有 JS SDK)?

android - Gradle 无法解析项目 :linkedin-sdk

linkedin - LinkedIn 是否有测试其 API 的平台?