@flatscout/source-immobilier-ch
v1.0.0
Published
Source plugin for [immobilier.ch](https://www.immobilier.ch). HTML-scraping plugin built on the site's public sitemap + embedded JSON-LD blocks. No anti-bot, no auth.
Readme
@flatscout/source-immobilier-ch
Source plugin for immobilier.ch. HTML-scraping plugin built on the site's public sitemap + embedded JSON-LD blocks. No anti-bot, no auth.
Coverage caveat
immobilier.ch is Romandie-heavy (probe-time counts: Geneva ~993, Lausanne ~500, Zurich ~220, Bern ~45). For Zurich-focused configs, use the url_must_include filter to drop the FR-CH long tail:
url_must_include: ['/zurich/zurich/']For FR-CH users, leave the filter empty to scan everything.
How it works
- Fetches
https://www.immobilier.ch/sitemap/rents.xmllisting every active rental detail URL with<lastmod>. - Sorts by
lastmoddesc and appliesurl_must_includefilter. - Iterates up to
max_details_per_scanURLs (default 50), fetches each detail page, extracts@type: Product+@type: ResidenceJSON-LD blocks and maps them intoListing. - Honors
pace_msbetween requests (default 5000ms, matches site's statedCrawl-delay).
Config
schedule: '*/15 * * * *'
sitemap_url: 'https://www.immobilier.ch/sitemap/rents.xml'
pace_ms: 5000
max_details_per_scan: 50
emit_on_first_scan: false
url_must_include: ['/zurich/zurich/']Tests
pnpm --filter @flatscout/source-immobilier-ch test
XML parsing, JSON-LD extraction, and mapping use inline fixtures. No live network calls.
