soup = BeautifulSoup(html, "html.parser")
list_table = soup.find_all("table", attrs={"class":"wikitable"})
with open('phrases.csv', 'w') as f:
soup = BeautifulSoup(html, "html.parser")
list_table = soup.find_all("table", attrs={"class":"wikitable"})
with open('phrases.csv', 'w') as f:
- for row in table.find_all("tr")[1:]:
- cell = row.find_all("td")
+ for row in table.tbody.find_all("tr", recursive=False):
+ cell = row.find_all("td", recursive=False)