Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prospection Bot (Playwright)

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.

Folder layout

  • 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.

Anti-detection principles (practical)

  • 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.

Data we capture

  • 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.

Website health heuristic

  • Missing if Maps has no website link.
  • Broken if HTTP status >=400 or DNS/timeout.
  • Social-only if website domain matches known social hosts.

SMS automation (one message only)

  • Pre-fill SMS_TEXT in config.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.

Quickstart

  1. Install deps: pip install -r requirements.txt then python -m playwright install chromium.
  2. Add cities and SMS text in src/config.py.
  3. Run: python -m src.workflow.run_prospection.
  4. Inspect outputs in data/leads.ndjson and data/leads.csv.

Notes

  • All scraping is best-effort; expect occasional CAPTCHAs. Keep runs spaced and volumes low.
  • Keep a dedicated Chrome user profile folder under ./.profiles/maps and ./.profiles/messages.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages