From c9a0dd04ed06193a24402a9dec5bd25b6adaf558 Mon Sep 17 00:00:00 2001 From: bergi Date: Tue, 6 Apr 2021 23:31:26 +0200 Subject: [PATCH] fix Konstanz scraper --- sources/konstanz.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/konstanz.py b/sources/konstanz.py index 22738d1..318a2d6 100644 --- a/sources/konstanz.py +++ b/sources/konstanz.py @@ -17,11 +17,11 @@ def download_snapshot_data(self): for tr in soup.find_all("tr"): row = [td.text.strip() for td in tr.find_all("td")] - if len(row) == 3 and row[0] == "": - + if len(row) == 2 and row[0] != "Parkmöglichkeit": + print(row) parking_places.append({ - "place_name": row[1], - "num_free": self.int_or_none(row[2]), + "place_name": row[0], + "num_free": self.int_or_none(row[1]), }) return parking_places \ No newline at end of file