gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 06:00:02 28 4
gpt4 key购买 nike

我需要获取 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com