Skip to content

Commit

Permalink
issue #3: update apag scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
defgsus committed Dec 30, 2021
1 parent a74e3c1 commit 7a90a06
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions web/scrapers/builtin/apag.geojson
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-adalbertsteinweg",
"id": "aachenparkhausadalbertsteinweg",
"name": "Adalbertsteinweg",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-adalbertsteinweg",
Expand All @@ -24,7 +24,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-adalbertstrasse",
"id": "aachenparkhausadalbertstrasse",
"name": "Adalbertstraße",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-adalbertstra%C3%9Fe",
Expand All @@ -44,13 +44,13 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-couvenstrasse",
"id": "aachenparkhauscouvenstrasse",
"name": "Couvenstraße",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-couvenstra%C3%9Fe",
"source_url": "https://www.apag.de/parken-in-aachen",
"address": "Parkhaus Couvenstraße\nCouvenstraße 4\n52062\nAachen",
"capacity": 525,
"capacity": 505,
"has_live_capacity": false
},
"geometry": {
Expand All @@ -64,7 +64,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-eurogress",
"id": "aachenparkhauseurogress",
"name": "Eurogress",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-eurogress",
Expand All @@ -84,7 +84,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-galeria-kaufhof-city",
"id": "aachenparkhausgaleriakaufhofcity",
"name": "Galeria Kaufhof/City",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-galeria-kaufhofcity",
Expand All @@ -104,7 +104,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-hauptbahnhof",
"id": "aachenparkhaushauptbahnhof",
"name": "Hauptbahnhof",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-hauptbahnhof",
Expand All @@ -124,7 +124,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-luisenhospital",
"id": "aachenparkhausluisenhospital",
"name": "Luisenhospital",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-luisenhospital",
Expand All @@ -144,7 +144,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-rathaus",
"id": "aachenparkhausrathaus",
"name": "Rathaus",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-rathaus",
Expand All @@ -164,7 +164,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkhaus-tivoli",
"id": "aachenparkhaustivoli",
"name": "Tivoli",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-tivoli",
Expand All @@ -184,7 +184,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkplatz-ludwig-forum",
"id": "aachenparkplatzludwigforum",
"name": "Ludwig Forum",
"type": "lot",
"public_url": "https://www.apag.de/parkobjekte/parkplatz-ludwig-forum",
Expand All @@ -204,7 +204,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkplatz-luisenhospital",
"id": "aachenparkplatzluisenhospital",
"name": "Luisenhospital",
"type": "lot",
"public_url": "https://www.apag.de/parkobjekte/parkplatz-luisenhospital",
Expand All @@ -224,7 +224,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkplatz-pontstrasse",
"id": "aachenparkplatzpontstrasse",
"name": "Pontstraße",
"type": "lot",
"public_url": "https://www.apag.de/parkobjekte/parkplatz-pontstra%C3%9Fe",
Expand All @@ -244,7 +244,7 @@
{
"type": "Feature",
"properties": {
"id": "aachen-parkplatz-uniklinik",
"id": "aachenparkplatzuniklinik",
"name": "Uniklinik",
"type": "lot",
"public_url": "https://www.apag.de/parkobjekte/parkplatz-uniklinik",
Expand All @@ -264,7 +264,7 @@
{
"type": "Feature",
"properties": {
"id": "datteln-parkdeck-stadtgalerie",
"id": "dattelnparkdeckstadtgalerie",
"name": "StadtGalerie",
"type": "level",
"public_url": "https://www.apag.de/parkobjekte/parkdeck-stadtgalerie",
Expand All @@ -284,7 +284,7 @@
{
"type": "Feature",
"properties": {
"id": "datteln-parkhaus-stadtgalerie",
"id": "dattelnparkhausstadtgalerie",
"name": "StadtGalerie",
"type": "garage",
"public_url": "https://www.apag.de/parkobjekte/parkhaus-stadtgalerie",
Expand Down
4 changes: 2 additions & 2 deletions web/scrapers/builtin/apag.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _scrape_data(self, id_prefix: str, url: str) -> List[LotData]:
lots.append(
LotData(
timestamp=now,
id=f"{id_prefix}-{parking_name}",
id=name_to_legacy_id(id_prefix, parking_name),
num_free=parking_free,
status=parking_state,
)
Expand Down Expand Up @@ -100,7 +100,7 @@ def _scrape_lot_infos(self, id_prefix: str, url: str) -> List[LotInfo]:

lots.append(
LotInfo(
id=f"{id_prefix}-{parking_name}",
id=name_to_legacy_id(id_prefix, parking_name),
name=name,
type=type,
public_url=lot_url,
Expand Down

0 comments on commit 7a90a06

Please sign in to comment.