Skip to content

Commit 13b72f9

Browse files
merge fixes (#1)
* fix person.py * Update person.py * Update person.py * Update person.py * Update person.py --------- Co-authored-by: Sachin Shankar <sachinshankar2010@gmail.com>
1 parent 7807196 commit 13b72f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

linkedin_scraper/person.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class Person(Scraper):
1313

14-
__TOP_CARD = "pv-top-card"
14+
__TOP_CARD = "scaffold-layout__main"
1515
__WAIT_FOR_ELEMENT_TIMEOUT = 5
1616

1717
def __init__(
@@ -115,7 +115,7 @@ def get_experiences(self):
115115
self.scroll_to_bottom()
116116
main_list = self.wait_for_element_to_load(name="pvs-list", base=main)
117117
for position in main_list.find_elements(By.XPATH,"li"):
118-
position = position.find_element(By.CLASS_NAME,"pvs-entity")
118+
position = position.find_element(By.CLASS_NAME,"pvs-entity--padded")
119119
company_logo_elem, position_details = position.find_elements(By.XPATH,"*")
120120

121121
# company elem
@@ -240,9 +240,9 @@ def get_educations(self):
240240
self.add_education(education)
241241

242242
def get_name_and_location(self):
243-
top_panels = self.driver.find_elements(By.CLASS_NAME,"pv-text-details__left-panel")
244-
self.name = top_panels[0].find_elements(By.XPATH,"*")[0].text
245-
self.location = top_panels[1].find_element(By.TAG_NAME,"span").text
243+
top_panel = self.driver.find_element(By.XPATH, "//*[@class='mt2 relative']")
244+
self.name = top_panel.find_element(By.TAG_NAME, "h1").text
245+
self.location = top_panel.find_element(By.XPATH, "//*[@class='text-body-small inline t-black--light break-words']")
246246

247247

248248
def get_about(self):

0 commit comments

Comments
 (0)