Open
Conversation
This was referenced Jan 21, 2024
| self.location = top_panels[1].find_element(By.TAG_NAME,"span").text | ||
| top_panel = self.driver.find_element(By.XPATH, "//*[@class='mt2 relative']") | ||
| self.name = top_panel.find_element(By.TAG_NAME, "h1").text | ||
| self.location = top_panel.find_element(By.XPATH, "//*[@class='text-body-small inline t-black--light break-words']") |
There was a problem hiding this comment.
You are only getting the element location, not the text.
Also, I believe it is better to follow along the __TOP_CARD instead of searching over the entire webpage.
You can do something like:
top_panel = self.driver.__TOP_CARD.find_element(By.CLASS_NAME, ".mt2.relative")
Contributor
There was a problem hiding this comment.
thanks for this
note it's missing a '.text' at the end for self.location
| main_list = self.wait_for_element_to_load(name="pvs-list", base=main) | ||
| for position in main_list.find_elements(By.XPATH,"li"): | ||
| position = position.find_element(By.CLASS_NAME,"pvs-entity") | ||
| position = position.find_element(By.CLASS_NAME,"pvs-entity--padded") |
There was a problem hiding this comment.
The get_experiences() function needs more rework, as some of the data is getting repeated for certain experiences, while some data is getting omitted for some experiences.
|
Doesn't look like this fix works for the current version of LinkedIn. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LinkedIn changed some structure. This PR should fix it