How madi-s/lead-generation works
This repository is a lead-generation scraper: users configure Google Maps or Yelp searches, run asynchronous browser-backed engines, collect business fields, then export entries to CSV. The current package shares browser setup, result traversal, parsing hooks, and CSV writing; Google Maps also resolves locations to coordinates. The README lists Google Search as an expectation rather than current functionality. An archived generation contains separate Google Maps, Yelp, Yellow Pages, and LinkedIn scripts plus an older Flask app. Archived links are included only where the excerpts or source index show them; other internals were not inspected.
Main entry points: base.py Engine runner · google_maps/engine.py Google Maps engine · webdriver.py Legacy browser · yelp/engine.py Yelp engine
Components 24
Current Scrapers
- Google Maps engine
py_lead_generation/src/google_maps/engine.py - Yelp engine
py_lead_generation/src/yelp/engine.py - Google Search (expected)
py_lead_generation/src/google_search
Shared Runtime
- Engine runner
py_lead_generation/src/engines/base.py - Scraper contract
py_lead_generation/src/engines/abstract.py - Playwright setup
py_lead_generation/src/engines/playwright_config.py - Location coordinates
py_lead_generation/src/misc/utils.py - CSV writer
py_lead_generation/src/misc/writer.py
Archived Scrapers
- Legacy Maps scraper
archived/google-maps/extractor.py - Legacy Yelp scraper
archived/yellow-pages/extractor.py - LinkedIn scraper
archived/linkedin/extractor.py - Legacy browser
archived/webdriver.py - Result buffer
archived/bufferization.py - Legacy logging
archived/logger_config.py
Archived Web App
- Flask app and config
archived/app/app.py - Web views
archived/app/views.py - Web forms
archived/app/forms.py - User and subscription models
archived/app/models.py - Password crypto
archived/app/crypto.py
Other components
- Search user
- Google Maps
- Yelp
- CSV output
- Web app visitor
Connections 23
- Search user → Google Maps engine: configures search
README.md - Search user → Yelp engine: configures search
README.md - Google Maps engine → Location coordinates: resolves location
py_lead_generation/src/google_maps/engine.py - Google Maps engine → Engine runner: inherits runner
py_lead_generation/src/google_maps/engine.py - Yelp engine → Engine runner: inherits runner
py_lead_generation/src/yelp/engine.py - Engine runner → Playwright setup: sets up browser
py_lead_generation/src/engines/base.py - Engine runner → Scraper contract: calls scraper hooks
py_lead_generation/src/engines/base.py - Engine runner → CSV writer: appends entries
py_lead_generation/src/engines/base.py - CSV writer → CSV output: writes CSV
py_lead_generation/src/misc/writer.py - Google Maps engine → Google Maps: scrapes listings
py_lead_generation/src/google_maps/engine.py - Yelp engine → Yelp: scrapes listings
py_lead_generation/src/yelp/engine.py - Web app visitor → Flask app and config: opens app
- Flask app and config → Web views: loads views
archived/app/main.py - Web views → Web forms: uses forms
archived/app/views.py - Web views → User and subscription models: uses models
archived/app/views.py - User and subscription models → Password crypto: uses crypto
archived/app/models.py - Legacy Maps scraper → Legacy browser: uses browser
archived/google-maps/extractor.py - Legacy Yelp scraper → Legacy browser: uses browser
archived/yellow-pages/extractor.py - LinkedIn scraper → Legacy browser: uses browser
archived/linkedin/extractor.py - Legacy browser → Result buffer: buffers results
archived/webdriver.py - Legacy Maps scraper → Legacy logging: logs activity
archived/google-maps/extractor.py - Legacy Yelp scraper → Legacy logging: logs activity
archived/yellow-pages/extractor.py - LinkedIn scraper → Legacy logging: logs activity
archived/linkedin/extractor.py