SUAD_Park / src /main.py
leo-bourrel's picture
feat: ignore not found park
82aae5c
raw
history blame contribute delete
631 Bytes
from read_kml import parse_kml, get_coordinates
from fetch_places import nearby_search, fetch_place_photos, place_details
from tqdm import tqdm
if __name__ == "__main__":
file_path = "datas/Espaces_verts_SCAI.kml"
kml_data = parse_kml(file_path)
coordinates = get_coordinates(kml_data)
for place_name, coordinate in tqdm(coordinates.items()):
try:
place_id, _, photos = nearby_search(coordinate)
if not place_id:
continue
fetch_place_photos(place_id, place_name, photos)
except Exception as e:
print(f"Error: {e} for {place_name}")