Skip to content

feat(linkedin): add company LinkedIn ID to job posts - #371

Open
Ni-co-la-s wants to merge 1 commit into
speedyapply:mainfrom
Ni-co-la-s:main
Open

feat(linkedin): add company LinkedIn ID to job posts#371
Ni-co-la-s wants to merge 1 commit into
speedyapply:mainfrom
Ni-co-la-s:main

Conversation

@Ni-co-la-s

Copy link
Copy Markdown

Summary

Adds company_linkedin_id to the retrieved fields when linkedin_fetch_description==True.

Linkedin company ids can already be used for filtering in linkedin search, but there is no easy way to retrieve them. You have to look up the company page manually (or use an external dataset but only ones I could find are pretty old).

So I think being able to retrieve the company ids while scraping would make it easier to reuse them later on for future searches.

Changes

  • jobspy/linkedin/init.py : Retrieved company_linkedin_id from the job detail page using the meta tag "companyId"
  • jobspy/model.py and jobspy/util.py: Added new field to the JobPost model and the output order df
  • README.md: Added new field info

Testing

  • I have tested it locally with about 1000 jobs parsed over the past days
  • To test quickly, you can use the script
from jobspy import scrape_jobs

df=scrape_jobs(site_name='linkedin', search_term='software engineer', location='United States', results_wanted=10, linkedin_fetch_description=True)

print(df[['title','company','company_linkedin_id','job_url']].to_string(index=False))

Output at the time of the PR:

Title Company Company LinkedIn ID Job URL
Software Engineer Nuvo 82490513 https://www.linkedin.com/jobs/view/4378357766
Software Engineer Chalk 78829224 https://www.linkedin.com/jobs/view/4406548495
Software Developer Weekday (YC W21) 69656080 https://www.linkedin.com/jobs/view/4432097763
Software Engineer (All Levels) Blossom 104568728 https://www.linkedin.com/jobs/view/4432033379
Software Engineer Yext 515401 https://www.linkedin.com/jobs/view/4081518713
Software Engineer Rilla 11745039 https://www.linkedin.com/jobs/view/4427404272
Software Engineer Oso 13056430 https://www.linkedin.com/jobs/view/4363726700
Software Engineer Candid Health 70448411 https://www.linkedin.com/jobs/view/4339199299
Software Engineer Moab 100925956 https://www.linkedin.com/jobs/view/4318517031
Software Engineer Voltai 99344719 https://www.linkedin.com/jobs/view/4318514364

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant