From 3bd356259dde439f8f31be0a7cc6d60dac239522 Mon Sep 17 00:00:00 2001 From: Holger Bruch Date: Sat, 21 Oct 2023 19:11:10 +0200 Subject: [PATCH 1/3] Luebeck: update lot infos --- original/luebeck.geojson | 100 ++++++++++++--------------------------- 1 file changed, 30 insertions(+), 70 deletions(-) diff --git a/original/luebeck.geojson b/original/luebeck.geojson index d120622..998e798 100644 --- a/original/luebeck.geojson +++ b/original/luebeck.geojson @@ -1,26 +1,6 @@ { "type": "FeatureCollection", "features": [ - { - "type": "Feature", - "properties": { - "id": "luebeckamburgtor", - "name": "Am Burgtor", - "type": "garage", - "public_url": "https://www.parken-luebeck.de/detail/ph-am-burgtor/", - "source_url": null, - "address": "Kanalstraße 1-5\n23552 Lübeck", - "capacity": 99, - "has_live_capacity": true - }, - "geometry": { - "type": "Point", - "coordinates": [ - 10.692226, - 53.873013 - ] - } - }, { "type": "Feature", "properties": { @@ -30,7 +10,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-am-fischereihafen/", "source_url": null, "address": "Travemünder Landstraße\n23570 Travemünde", - "capacity": 358, + "capacity": 393, "has_live_capacity": true }, "geometry": { @@ -101,26 +81,6 @@ ] } }, - { - "type": "Feature", - "properties": { - "id": "luebeckfalkenstrasse", - "name": "Falkenstraße", - "type": "garage", - "public_url": "https://www.parken-luebeck.de/detail/ph-falkenstrasse/", - "source_url": null, - "address": "Falkenstraße 27\n23564 Lübeck", - "capacity": 130, - "has_live_capacity": true - }, - "geometry": { - "type": "Point", - "coordinates": [ - 10.698406, - 53.870015 - ] - } - }, { "type": "Feature", "properties": { @@ -150,7 +110,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-hafenbahnhof/", "source_url": null, "address": "Vogteistraße\n23570 Travemünde", - "capacity": 57, + "capacity": 46, "has_live_capacity": true }, "geometry": { @@ -170,7 +130,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-kanalstrasse-p1/", "source_url": null, "address": "Kanalstraße\n23552 Lübeck", - "capacity": 105, + "capacity": 107, "has_live_capacity": true }, "geometry": { @@ -190,7 +150,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-kanalstrasse-p2/", "source_url": null, "address": "Kanalstraße\n23552 Lübeck", - "capacity": 216, + "capacity": 204, "has_live_capacity": true }, "geometry": { @@ -210,7 +170,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-kanalstrasse-p3/", "source_url": null, "address": "Kanalstraße\n23552 Lübeck", - "capacity": 160, + "capacity": 122, "has_live_capacity": true }, "geometry": { @@ -250,7 +210,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-kanalstrasse-p5/", "source_url": null, "address": "Kanalstraße\n23560 Lübeck", - "capacity": 45, + "capacity": 46, "has_live_capacity": true }, "geometry": { @@ -290,7 +250,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-lastadie-p3/", "source_url": null, "address": "Willy-Brandt-Allee\n23554 Lübeck", - "capacity": 33, + "capacity": 35, "has_live_capacity": true }, "geometry": { @@ -301,26 +261,6 @@ ] } }, - { - "type": "Feature", - "properties": { - "id": "luebecklastadiep5", - "name": "Lastadie P5", - "type": "lot", - "public_url": "https://www.parken-luebeck.de/detail/pp-lastadie-p5/", - "source_url": null, - "address": "Willy-Brandt-Allee\n23554 Lübeck", - "capacity": 254, - "has_live_capacity": true - }, - "geometry": { - "type": "Point", - "coordinates": [ - 10.67872, - 53.87153 - ] - } - }, { "type": "Feature", "properties": { @@ -330,7 +270,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-leuchtenfeld/", "source_url": null, "address": "Trelleborgallee\n23570 Travemünde", - "capacity": 528, + "capacity": 550, "has_live_capacity": true }, "geometry": { @@ -390,7 +330,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-muk/", "source_url": null, "address": "Willy-Brandt-Alle (Nähe 10)\n23554 Lübeck", - "capacity": 330, + "capacity": 350, "has_live_capacity": true }, "geometry": { @@ -430,7 +370,7 @@ "public_url": "https://www.parken-luebeck.de/detail/pp-radisson-blue/", "source_url": null, "address": "Willy-Brandt-Alle (Nähe 8)\n23554 Lübeck", - "capacity": 57, + "capacity": 61, "has_live_capacity": true }, "geometry": { @@ -460,6 +400,26 @@ 53.868977 ] } + }, + { + "type": "Feature", + "properties": { + "id": "luebeckbeachbaypriwall", + "name": "BeachBay / Priwall", + "type": "garage", + "public_url": "https://www.parken-luebeck.de/detail/parkhaus-beachbay-parkhaus-priwall/", + "source_url": null, + "address": "Dünenweg 2a\n23570 Travemünde", + "capacity": 283, + "has_live_capacity": true + }, + "geometry": { + "type": "Point", + "coordinates": [ + 10.8817, + 53.954689 + ] + } } ] } \ No newline at end of file From eb3f9c6d97195652bb61009e0636f97b52e4f5aa Mon Sep 17 00:00:00 2001 From: Holger Bruch Date: Sat, 21 Oct 2023 19:27:56 +0200 Subject: [PATCH 2/3] Kaiserslautern: adapt kreissparkasse renaming --- original/kaiserslautern.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/original/kaiserslautern.py b/original/kaiserslautern.py index 62a2eea..f20fba1 100644 --- a/original/kaiserslautern.py +++ b/original/kaiserslautern.py @@ -21,6 +21,12 @@ class Kaiserslautern(ScraperBase): ) def get_lot_data(self) -> List[LotData]: + # The folowing parkings have been renamed and need to be mapped + # to their legacy_id + LOT_NAME_TO_LEGACY_ID_MAPPPING = { + "PH Sparkasse": "phkreissparkasse" + } + timestamp = self.now() soup = self.request_soup(self.POOL.source_url) @@ -29,7 +35,8 @@ def get_lot_data(self) -> List[LotData]: last_updated = self.to_utc_datetime(soup.find("zeitstempel").text) for ph in soup.find_all("parkhaus"): - lot_name = ph.find("name").text + lot_name_source = ph.find("name").text + lot_name = LOT_NAME_TO_LEGACY_ID_MAPPPING.get(lot_name_source, lot_name_source) lot_actual = int(ph.find("aktuell").text) lot_total = int(ph.find("gesamt").text) From f8cb1dcb809c0d1561cf59799a7581724742fa6e Mon Sep 17 00:00:00 2001 From: Holger Bruch Date: Sat, 21 Oct 2023 19:40:29 +0200 Subject: [PATCH 3/3] Bochum: add missing garages and fix entrance coord --- new/bochum.geojson | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/new/bochum.geojson b/new/bochum.geojson index 33fd3fc..ed61503 100644 --- a/new/bochum.geojson +++ b/new/bochum.geojson @@ -16,8 +16,8 @@ "geometry": { "type": "Point", "coordinates": [ - 7.21582, - 51.48043 + 7.21589, + 51.48017 ] } }, @@ -101,6 +101,26 @@ ] } }, + { + "type": "Feature", + "properties": { + "id": "bochum-17", + "name": "PH Husemann Karree", + "type": "garage", + "public_url": "https://www.parken-in-bochum.de/parkhaeuser/parkhaus/ph-husemann-karree/", + "source_url": "https://www.parken-in-bochum.de/parkhaeuser/", + "address": "Bochumer Innenstadt, zwischen Kortumstraße (Fußgängerzone) und Junggesellenstraße", + "capacity": 510, + "has_live_capacity": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + 7.2159511, + 51.4800041 + ] + } + }, { "type": "Feature", "properties": { @@ -201,6 +221,26 @@ ] } }, + { + "type": "Feature", + "properties": { + "id": "bochum-7", + "name": "P7 Kurt-Schumacher-Platz", + "type": "garage", + "public_url": "https://www.parken-in-bochum.de/parkhaeuser/parkhaus/p7-kurt-schumacher-platz/", + "source_url": "https://www.parken-in-bochum.de/parkhaeuser/", + "address": "Bochumer Innenstadt, direkt am Hauptbahnhof", + "capacity": 432, + "has_live_capacity": false + }, + "geometry": { + "type": "Point", + "coordinates": [ + 7.221024, + 51.4781061 + ] + } + }, { "type": "Feature", "properties": {