[object Object]

← back to Rentv 2026

pr/website: Cody gate — (1) wire the THIRD email-scan (profileOrganization L283, which populates general_press_email) to the shared isJunkContactEmail — my first pass missed it, so noreply/image emails still leaked into the main enrichment output. (2) DROP the @2x arm entirely: it false-positived real '2x' domains (pr@2xmedia.com, contact@2x.vc) and was redundant — retina image emails always end in an image extension already caught by the \.(png|…) arm. (3) \bexample\. avoids theexample.com. All 3 call sites now share one predicate; 15 predicate cases + both extractors verified

0f85ba3073e0246dc3f66165c2909558b9ed12f8 · 2026-08-05 20:30:23 -0700 · Steve

Files touched

Diff

commit 0f85ba3073e0246dc3f66165c2909558b9ed12f8
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Aug 5 20:30:23 2026 -0700

    pr/website: Cody gate — (1) wire the THIRD email-scan (profileOrganization L283, which populates general_press_email) to the shared isJunkContactEmail — my first pass missed it, so noreply/image emails still leaked into the main enrichment output. (2) DROP the @2x arm entirely: it false-positived real '2x' domains (pr@2xmedia.com, contact@2x.vc) and was redundant — retina image emails always end in an image extension already caught by the \.(png|…) arm. (3) \bexample\. avoids theexample.com. All 3 call sites now share one predicate; 15 predicate cases + both extractors verified
---
 src/pr/adapters/website.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pr/adapters/website.js b/src/pr/adapters/website.js
index 591b9753..6ada1164 100644
--- a/src/pr/adapters/website.js
+++ b/src/pr/adapters/website.js
@@ -24,7 +24,10 @@ const PHONE_RE = /\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}/g;
 // filenames mistaken as emails ("photo@2x.png"), tracking/CMS addresses, and no-reply system
 // mailboxes. Used by BOTH extractors so press + team pages filter consistently.
 function isJunkContactEmail(em) {
-  return /example\.|sentry|wixpress|schema\.org|googleapis|\.(png|jpe?g|gif|svg|webp)(\b|$)|@2x|\bno[-.]?reply\b|\bdo[-.]?not[-.]?reply\b/i.test(String(em || ''));
+  // NO `@2x` arm: a retina image email ("photo@2x.png") always ends in an image extension, so the
+  // `\.(png|…)` arm already catches it — while `@2x.` alone would wrongly nuke real "2x" domains
+  // (pr@2xmedia.com, contact@2x.vc). `\bexample\.` avoids "theexample.com".
+  return /\bexample\.|sentry|wixpress|schema\.org|googleapis|\.(png|jpe?g|gif|svg|webp)(\b|$)|\bno[-.]?reply\b|\bdo[-.]?not[-.]?reply\b/i.test(String(em || ''));
 }
 
 function absolutize(href, base) {
@@ -280,7 +283,7 @@ const adapter = register({
     }
     for (const pg of pagesToScan) {
       const emails = [...new Set((String(pg.body).match(EMAIL_RE) || []).map((e) => normalizeEmail(e)).filter(Boolean))]
-        .filter((e) => !/example\.|sentry|wixpress|schema\.org|\.png$|\.jpg$/i.test(e));
+        .filter((e) => !isJunkContactEmail(e));
       const pressEmails = emails.filter((e) => PRESSY_EMAIL.test(e));
       item.press_emails.push(...pressEmails);
       if (!item.general_press_email && pressEmails.length) item.general_press_email = pressEmails[0];

← d308a6f1 pr/website: shared isJunkContactEmail() filter for BOTH extr  ·  back to Rentv 2026  ·  auto-save: 2026-08-05T20:45:35 (7 files) — data/deals-regist 3c791fc6 →