2 # Tool to extract famous phrases from wikipedia
3 from bs4 import BeautifulSoup
6 url = 'https://en.wikipedia.org/wiki/List_of_Latin_phrases_(full)'
7 response = requests.get(url)
8 html = response.content
10 soup = BeautifulSoup(html, "html.parser")
11 list_table = soup.find_all("table", attrs={"class":"wikitable"})
12 f = open("phrases", "w")
14 for table in list_table:
15 for row in table.find_all("tr")[1:]:
17 cell = row.find_all("td")
19 text = content.get_text()