From 309af62d63dd7b448d141700541ed232bfa72115 Mon Sep 17 00:00:00 2001 From: Markus Zimmerberger Date: Tue, 8 Oct 2024 08:59:23 +0200 Subject: [PATCH] Initial commit POMOS death scraping --- main.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..cdc837e --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +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 + +#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") \ No newline at end of file