Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scraping location fails when the profile has more than one current job. #8

Open
peterbaldridge opened this issue Apr 4, 2023 · 2 comments

Comments

@peterbaldridge
Copy link

peterbaldridge commented Apr 4, 2023

When a person works at more than one company, or works a job and is also going to school, the code will scrape the second company or school instead of the location.

Here's a fix:
var temp = profileSection?.querySelector(".pv-text-details__left-panel.mt2")
var tbs = temp.querySelectorAll(".text-body-small")
const locationElement = ((tbs) ? tbs[0] : null)
var loc = locationElement?.textContent || null

@DrakenWan
Copy link
Owner

Hi thank you for the solution. I am already working on making it correct. Just busy with school work so it is taking some time. I will also try your solution. If you want, you can try a pull request or create a new branch and create a pull request from it. I would be very grateful.

@peterbaldridge
Copy link
Author

Thanks! I will try to create a pull request this week!

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

No branches or pull requests

2 participants