Files
pomos/crawler_bestattung-wels.py
T
2025-02-20 17:55:05 +01:00

23 lines
665 B
Python

import requests
from bs4 import BeautifulSoup
URL = "https://www.bestattung-wels.at/current-deaths/"
page = requests.get(URL)
soup = BeautifulSoup(page.content, "html.parser")
death_table = soup.find("table", attrs={"class": "death-table"})
death_table_data = death_table.find_all("tr")
for row in death_table_data:
cols = row.find_all('td')
cols = [ele.text.strip() for ele in cols]
print(cols) # This will print each row as a list
#pagination__next-btn__content
#for death in death_table_data:
# print(death.full-name.text)
#results = soup.findAll({"id" : lambda L: L and L.startswith('death-row-')})
results = soup.find("death-table-body")