From e03724306e67826989a9078666e65cfc6e119e82 Mon Sep 17 00:00:00 2001 From: JCruiz15 Date: Wed, 30 Oct 2024 15:40:35 +0100 Subject: [PATCH] fix: Fixed error when using search function (Not Found error) --- sigpac_tools/search.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sigpac_tools/search.py b/sigpac_tools/search.py index 5be5b40..703070c 100644 --- a/sigpac_tools/search.py +++ b/sigpac_tools/search.py @@ -48,14 +48,14 @@ def search(data: dict) -> dict: if parc: logger.info("Searching for the parcel specified") response = requests.get( - f"{BASE_URL}/fega/ServiciosVisorSigpac/query/recintos/{prov}/{muni}/0/0/{polg}/{parc}.geojson" + f"{BASE_URL}/fega/ServiciosVisorSigpac/query/recintos/{prov}/{muni}/0/0/{polg}/{parc}" ) geojson = response.json() return geojson else: logger.info(f"Searching for the parcels of the polygon {polg}") response = requests.get( - f"{BASE_URL}/fega/ServiciosVisorSigpac/query/parcelas/{prov}/{muni}/0/0/{polg}.geojson" + f"{BASE_URL}/fega/ServiciosVisorSigpac/query/parcelas/{prov}/{muni}/0/0/{polg}" ) geojson = response.json() return geojson @@ -64,21 +64,21 @@ def search(data: dict) -> dict: f"Searching for the polygons of the municipality {muni}" ) response = requests.get( - f"{BASE_URL}/fega/ServiciosVisorSigpac/query/poligonos/{prov}/{muni}/0/0.geojson" + f"{BASE_URL}/fega/ServiciosVisorSigpac/query/poligonos/{prov}/{muni}/0/0" ) geojson = response.json() return geojson else: logger.info(f"Searching for the municipalities of the province {prov}") response = requests.get( - f"{BASE_URL}/fega/ServiciosVisorSigpac/query/municipios/{prov}.geojson" + f"{BASE_URL}/fega/ServiciosVisorSigpac/query/municipios/{prov}" ) geojson = response.json() return geojson else: logger.info(f"Searching for the provinces of the community {comm}") response = requests.get( - f"{BASE_URL}/fega/ServiciosVisorSigpac/query/provincias/{comm}.geojson" + f"{BASE_URL}/fega/ServiciosVisorSigpac/query/provincias/{comm}" ) geojson = response.json() return geojson