lewislover44

Untitled

Sep 22nd, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. table_raw = self.driver.find_element_by_tag_name('tbody').get_attribute('innerHTML')
  2. soup = BeautifulSoup(table_raw, features='html.parser')
  3.  
  4. rows = soup.find_all('tr')
  5. for row in rows:
  6. cols = row.find_all('td')
  7. cols = [x.text.strip() for x in cols]
  8. print(cols)
Advertisement
Add Comment
Please, Sign In to add comment