Skip to content

Fix selector#56

Draft
utkarshsingh99 wants to merge 2 commits intoayushjainrksh:masterfrom
utkarshsingh99:patch1
Draft

Fix selector#56
utkarshsingh99 wants to merge 2 commits intoayushjainrksh:masterfrom
utkarshsingh99:patch1

Conversation

@utkarshsingh99
Copy link
Contributor

Description

The new change in the LinkedIn UI needs new selectors.

Fixes #55

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@utkarshsingh99
Copy link
Contributor Author

Current problem:

TypeError: profileLinks.push is not iterable (cannot read property Symbol(Symbol.iterator))
    at fetchProfileLinks (/home/utkarsh/Work/OSS/linkedin-scraper/scrape.js:75:18)

"\n" +
"Please check the LinkedIn handle of the company you're trying to find and your credentials and try again."
"Please check the LinkedIn handle of the company you're trying to find and your credentials and try again.",
e
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@utkarshsingh99 Was this change made on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was for debugging purposes. I'll revert it once the issue is resolved.

@ayushjainrksh
Copy link
Owner

@utkarshsingh99 4 png files have also been added in the PR. Please have a look.

The error can possibly be due to empty profileLinks array ( which cannot be iterated and gives an error ). This means more selectors would need to be updated to get the profile links of each user.

@utkarshsingh99
Copy link
Contributor Author

4 png files have also been added in the PR

Oh, I'm so sorry. I'll remove them asap.

The error can possibly be due to empty profileLinks array

Yes, this is the selector that I have added in the profileListSelectors array: ".org-people-profiles-module__profile-list , .artdeco-button--tertiary"
Please check if this is the right one.
For some reason, the page does scroll down under the People tab, but it clicks on the upper div, with the stats displayed about it's employees.

Should I commit these temporary changes for you to have a better look?

@ayushjainrksh
Copy link
Owner

@utkarshsingh99 Thanks for the changes.

One thing to keep in mind while working on the selectors is that different people can have different UIs at a point in time as seen in the past. As soon as it works for you, I can try it on my account and add the required set of selectors.

After visiting view all employees, the script is supposed to get all the profile links on that page and click on the bottom navigation to visit the next page of employees. The step is repeated till N number of pages. Once this is done, we visit each profile to get the activity.

You can commit the changes if you need something to be reviewed/or facing a problem.

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.

Unable to fetch users

2 participants