Zero-cost lead prospection pipeline that scrapes Google Maps for "coach sportif" + city, extracts contact details, flags missing/broken websites, stores results locally, and triggers a single predefined SMS via Google Messages Web.
src/config.py— runtime knobs (cities, keywords, SMS template, storage paths, throttling).src/browser/session.py— Playwright context creation with anti-detection tuning.src/scraper/maps_search.py— Google Maps search + listing collection.src/extractors/maps_parser.py— normalize listing data (name, phone, website, socials) and website health checks.src/storage/local_store.py— write NDJSON and CSV snapshots.src/messaging/google_messages.py— send one SMS via Google Messages Web (requires prior login/QR).src/workflow/run_prospection.py— orchestration entrypoint.requirements.txt— Python deps.
- Run non-headless (
headless=False), inject realistic viewport and UA, enable locale/timezone matching target region. - Stagger actions: random sleeps, slow mouse/scroll, limit concurrency, close pages when idle.
- Keep cookie jar per profile folder; reuse storage state between runs.
- Avoid aggressive pagination: cap results per city, add backoff when Maps rate-limits or shows CAPTCHA.
- Rotate search entry: vary keyword order (
coach sportif lyon,lyon coach sportif), shuffle city list.
name,category,rating,review_count,address,city,phone,website,social_links(Facebook, Instagram, WhatsApp, TikTok, LinkedIn when present),website_status(ok|missing|broken|social-only),source_url,scraped_at.
- Missing if Maps has no website link.
- Broken if HTTP status >=400 or DNS/timeout.
- Social-only if website domain matches known social hosts.
- Pre-fill
SMS_TEXTinconfig.py. - Keep a single target number per run; the workflow sends at most one SMS after storing leads and picking the best candidate.
- Google Messages Web requires a manual QR login once; storage state is reused afterwards.
- Install deps:
pip install -r requirements.txtthenpython -m playwright install chromium. - Add cities and SMS text in
src/config.py. - Run:
python -m src.workflow.run_prospection. - Inspect outputs in
data/leads.ndjsonanddata/leads.csv.
- All scraping is best-effort; expect occasional CAPTCHAs. Keep runs spaced and volumes low.
- Keep a dedicated Chrome user profile folder under
./.profiles/mapsand./.profiles/messages.