From 20ab7fde9575af5ba2da0320c3528c3f5c624f29 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 31 May 2025 21:57:44 +0000 Subject: [PATCH] add all of dict_nicely to the export for immoweb to allow using any of the available listing data --- crawler/ui_exporter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crawler/ui_exporter.py b/crawler/ui_exporter.py index 24496ff..94593ff 100644 --- a/crawler/ui_exporter.py +++ b/crawler/ui_exporter.py @@ -21,9 +21,13 @@ async def export_immoweb(ctx, output_file: str): 'city': 'London', # change me 'country': 'United Kingdom', 'qm': await listing.sqm_ocr(), - 'qmprice': await listing.price_per_sqm(), + 'qmprice': round(await listing.price_per_sqm(), 2), 'rooms': listing.bedrooms, 'total_price': listing.price, + 'url': listing.url, + # Additional info; the above is GeoJSON format + # Below is all other crap we want in the UI + 'info': await listing.dict_nicely(), }, 'geometry': { 'coordinates': [