Skip to content

Free, open-source Google Maps scraper for lead generation (Python, no API key, no Docker). Exports name, phone, email, website, rating and Instagram/Facebook/LinkedIn/TikTok/YouTube/X links to CSV. 100 places with emails in 44 s; --grid beats Google's 120 cap. MX email check, ad-pixel detection. Skill for Claude Code, Codex and Cursor.

test(scrape): mock the engine ping in the Ctrl-C crawl test

Mahan Jafarid5084ca3f5e0
diff --git a/scripts/test_scrape.py b/scripts/test_scrape.py
index 00f2396..d40cbab 100644
--- a/scripts/test_scrape.py
+++ b/scripts/test_scrape.py
@@ -896,7 +896,8 @@ class ArgumentBounds(unittest.TestCase):
good, bad = dict(_row("A"), review_rating="4.8"), dict(_row("B"), review_rating="3.0")
argv = ["scrape.py", "x", "1", "2", "--min-rating", "4.5", "--no-socials", "--out",
os.path.join(tempfile.mkdtemp(), "leads.csv")]
- with mock.patch.object(scrape, "run_job", return_value=("job-1", [good, bad])), \
+ with mock.patch.object(scrape, "req", return_value=(200, b"null")), \
+ mock.patch.object(scrape, "run_job", return_value=("job-1", [good, bad])), \
mock.patch.object(scrape, "enrich_emails", side_effect=KeyboardInterrupt), \
mock.patch.dict(scrape.SALVAGE, {"rows": [], "job": None}), \
mock.patch.object(sys, "argv", argv), redirect_stdout(io.StringIO()), self.assertRaises(KeyboardInterrupt):