add scrapers: Moerman & De Jong (API) and Schieland Borsboom (SSR)

- fetch_moerman: OG Online realtime-listings API (same platform as bjornd),
  includes bouwjaar from dateOfConstruction, energielabel, strips postcode space
- fetch_schielandborsboom: paginated HTML scraper filtered to Schiedam,
  fetches #kenmerken detail page for full specs (bouwjaar, kamers, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 21:34:58 +02:00
parent edd2580919
commit c92ddb5812
4 changed files with 236 additions and 4 deletions

View File

@@ -182,11 +182,74 @@ def fetch_ooms() -> list[RawListing]:
log.info("ooms: %d listings opgehaald", len(listings))
return listings
# ---------------------------------------------------------------------------
# Moerman & De Jong Makelaars (Schiedam)
# ---------------------------------------------------------------------------
# Zelfde OG Online / realtime-listings platform als Bjornd.
_MOERMAN_BASE = "https://www.moerman-dejong.nl"
_MOERMAN_SKIP = {"rented", "rented_ur"}
_MOERMAN_STATUS_MAP = {
"available": "beschikbaar",
"under_bid": "onder_bod",
"under_option": "onder_bod",
"sold": "verkocht",
"sold_ur": "verkocht",
}
def fetch_moerman() -> list[RawListing]:
data = fetch_json(
f"{_MOERMAN_BASE}/nl/realtime-listings/consumer",
headers={"X-Requested-With": "XMLHttpRequest"},
)
listings = []
for item in data:
if not item.get("isSales"):
continue
if item.get("statusOrig") in _MOERMAN_SKIP:
continue
if item.get("salesPrice", 0) > config.MAX_PRICE:
continue
postcode = (item.get("zipcode") or "").replace(" ", "") or None
perceel = item.get("plotSurface") or None
if perceel == 0:
perceel = None
raw_year = item.get("dateOfConstruction") or ""
bouwjaar = int(raw_year) if raw_year.isdigit() else None
listings.append(RawListing(
url=_MOERMAN_BASE + item["url"],
source_makelaar="moerman",
status=_MOERMAN_STATUS_MAP.get(item.get("statusOrig", ""), "beschikbaar"),
adres=item.get("address") or None,
postcode=postcode,
stad=item.get("city") or None,
prijs=item.get("salesPrice") or None,
woningtype=item.get("type") or None,
woonoppervlak=item.get("livingSurface") or None,
perceeloppervlak=perceel,
kamers=item.get("rooms") or None,
slaapkamers=item.get("bedrooms") or None,
bouwjaar=bouwjaar,
energielabel=item.get("energyLabel") or None,
hero_image_url=item.get("photo") or None,
))
log.info("moerman: %d koopwoningen opgehaald", len(listings))
return listings
# ---------------------------------------------------------------------------
# SCRAPERS — exporteer hier alle actieve API adapters
# ---------------------------------------------------------------------------
SCRAPERS = {
'bjornd': fetch_bjornd,
'ooms': fetch_ooms,
'moerman': fetch_moerman,
}