- fetch_vwmakelaars, fetch_zomakelaars: one-liner Realworks wrappers - fetch_roepman: custom JSON-LD scraper (Realworks CMS uses div.aanbodEntry instead of li.aanbodEntry; price from potentialAction priceSpecification) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
716 B
Python
27 lines
716 B
Python
import sys
|
|
|
|
sys.path.insert(0, "../src")
|
|
|
|
import logging
|
|
|
|
from cache import * # noqa: F401 — must be before adapter imports
|
|
|
|
from adapters import SCRAPERS
|
|
|
|
logging.basicConfig(
|
|
stream=sys.stdout,
|
|
level=logging.INFO, # debug costs too many tokens
|
|
format="%(asctime)s %(levelname)s %(name)s — %(message)s",
|
|
datefmt="%Y-%m-%dT%H:%M:%S",
|
|
)
|
|
|
|
# --- change this to test a different adapter ---
|
|
ADAPTER = SCRAPERS['zomakelaars']
|
|
|
|
if __name__ == "__main__":
|
|
print(f"Testing adapter: {ADAPTER.__name__}")
|
|
listings = ADAPTER()
|
|
print(f"Got {len(listings)} listings\n")
|
|
for l in listings:
|
|
print(f" {l.adres}, {l.postcode}, {l.stad} — €{l.prijs} — {l.kamers} rooms — {l.url}")
|