Evolving a Legacy Scraping Script by Kauan MirandaEvolving a Legacy Scraping Script by Kauan Miranda

Evolving a Legacy Scraping Script

Portfolio project
Kauan Miranda
Evolving a Legacy Scraping Script into a High-Performance B2B Lead Intelligence Engine ๐Ÿš€
I realized early on that traditional lead scrapers hit a wall very quickly. Basic HTTP requests frequently fail against anti-bot barriers, miss dynamic JavaScript tracking tags (like Meta Pixels loaded asynchronously), and leave sales teams with unverified, low-quality data. On top of that, standard AI wrappers often hallucinate company details, destroying cold outreach credibility.
To fix this, I completely refactored the pipeline into a full-stack, production-ready B2B Lead Intelligence Engine built with FastAPI, Playwright Async, and Gemini API.
Key Architectural & Product Highlights:
โšก Dynamic Execution & Pixel Audit: Migrated from static HTTP requests to headless Playwright Async, dynamically evaluating window.fbq post-rendering to eliminate false negatives in Meta Pixel detection.
๐Ÿ›ก๏ธ Zero-Hallucination AI Enrichment: Powered by Gemini in Strict JSON Mode, the system extracts company summaries, target audiences, and personalized email icebreakers. Crucially, it enforces local evidence validationโ€”every AI claim must match verbatim text extracted from the prospect's site.
๐ŸŽฏ Human-in-the-Loop (HITL) Workflow: Built an intuitive dashboard allowing operators to review, edit, approve, or discard leads before exporting cleaned CSVs to CRMs (HubSpot, Lemlist, Instantly).
๐Ÿ“Š Automated Lead Scoring: Features an algorithmic 0โ€“100 quality score (Grades A, B, and C) based on contact completeness, tech stack footprint, and AI confidence.
๐Ÿ’พ Resilient Async Backend: Integrated SQLite background job persistence with cooperative task cancellation and asynchronous batch processing.
By bridging deep web automation with strict AI governance, this project transforms raw directory listings into fully audited, high-converting outbound campaign assets in seconds.

0 likes ยท 2 views ยท Sep 22, 2026

Evolving a Legacy Scraping Script into a High-Performance B2B Lead Intelligence Engine ๐Ÿš€ I realized early on that traditional lead scrapers hit a wall very ...

Tags