soup = BeautifulSoup(html, "html.parser")
list_table = soup.find_all("table", attrs={"class":"wikitable"})
-
-output = []
+f = open("phrases", "w")
for table in list_table:
for row in table.find_all("tr")[1:]:
+ f.write("%" )
cell = row.find_all("td")
for content in cell:
text = content.get_text()
- output.append(text)
-
-print(output)
-
+ f.write("\n" + text)
+f.close()