Skip to content

Commit

Permalink
Added wait for topcard
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyism committed Apr 10, 2021
1 parent e988acf commit 623e9a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion linkedin_scraper/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ def scrape_logged_in(self, close_on_complete=True):
driver = self.driver
duration = None

root = driver.find_element_by_class_name(self.__TOP_CARD)
root = WebDriverWait(driver, 3).until(
EC.presence_of_element_located(
(
By.CLASS_NAME,
self.__TOP_CARD,
)
)
)
self.name = root.find_elements_by_xpath("//section/div/div/div/*/li")[0].text.strip()

# get about
Expand Down

0 comments on commit 623e9a3

Please sign in to comment.