def get_content(html):
soup = BeautifulSoup(html, 'html.parser')
test=[]
table = soup.find('div', class_='table-wrapper')
for rows in table.find_all('tr')[1:]:
test.append({'Пункт вещания':[city.text for city in rows.find_all('td')]})
return test
def outfile(test):
print(test)
outfile(test)
def get_content(html):
soup = BeautifulSoup(html, 'html.parser')
test=[]
table = soup.find('div', class_='table-wrapper')
for rows in table.find_all('tr')[1:]:
test.append({'Пункт вещания':[city.text for city in rows.find_all('td')]})
return test
def outfile(test):
print(test)
testprint = get_content()
outfile(testprint)