Scrape used-car listings from leboncoin.fr — price (EUR), brand, model, year, mileage, fuel, gearbox, horsepower, body type, colour, Crit'Air, seller (pro/private), location, and photos. Export to JSON or CSV; optionally enrich each listing with its full French description.
Root-cause fix for 70% failure rate (2026-06-10 to 2026-06-12): DataDome was
blocking specific residential exit IPs with HTTP 403. The old retry loop rotated
browser profiles but kept the same proxy URL (same session_id = same exit IP),
making all 5 retries futile against a blocked IP.
Fix: on each HTTP block (403/429/401/405), _get_text now calls
proxy_configuration.new_url(session_id=fresh) to obtain a different
residential exit IP before the next attempt. Proxy URL is propagated back
through the call chain so subsequent requests use the fresh address.
_resolve_proxy_url renamed to _resolve_proxy_configuration and now returns
the ProxyConfiguration object (not a plain URL string) so the scraper can
rotate IPs at will.
Proxy URL passed per-request via session.get(proxy=url) instead of baking
it into the AsyncSession constructor, enabling per-retry IP rotation without
recreating the session.
6 new unit tests covering IP rotation: session_id uniqueness, rotation on block,
no rotation on network error, returned proxy_url reflects rotated address.
0.3.0 — 2026-06-10
Force-residential proxy guard: _resolve_proxy_url now always injects
groups=["RESIDENTIAL"] regardless of customer input, preventing the
datacenter-exit footgun that causes DataDome HTTP 403 on leboncoin.fr.
Fail-loud on unavailable proxy: raises RuntimeError with a clear message
instead of silently falling back to direct routing and returning empty results.
Added unit tests asserting RESIDENTIAL is forced and raises when proxy is
unavailable.
0.2.0 — 2026-06-05
Config-refresh re-push: ship RESIDENTIAL proxy prefill to live build so Apify auto-QA routes through residential exits (DataDome-class anti-bot requires residential IPs).
Bumped version to 0.2 — strictly greater than published 0.1.
0.1.3 — 2026-06-03
First live cloud publish. Fixed network-error retry (proxy 595 → retryable like HTTP blocks).
Added per-request Referer + Sec-Fetch-Site headers so DataDome sees a proper
same-origin navigation chain (landing → search → detail). Resolves HTTP 403
on the search endpoint from cloud residential IPs.