[object Object]

← back to Commercialrealestate

condos: date-order the list (newest-listed first) + all-licenses in detail modal + DOM chip; FIX preserve-on-block (never clobber good broker data with an empty WAF-blocked scrape); restore 27 backup-recovered listings

158df08a4e3556d29b0dc03f076a45b1097d531e · 2026-08-03 11:04:32 -0700 · Steve Abrams

Files touched

Diff

commit 158df08a4e3556d29b0dc03f076a45b1097d531e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Aug 3 11:04:32 2026 -0700

    condos: date-order the list (newest-listed first) + all-licenses in detail modal + DOM chip; FIX preserve-on-block (never clobber good broker data with an empty WAF-blocked scrape); restore 27 backup-recovered listings
---
 data/condo-brokers.json         | 125 ++++++++++++++++++++++++++++++++++++++--
 public/condos.html              |  14 ++++-
 scripts/condos-report.js        |  11 ++--
 scripts/enrich-condo-brokers.js |  10 +++-
 4 files changed, 146 insertions(+), 14 deletions(-)

diff --git a/data/condo-brokers.json b/data/condo-brokers.json
index 9650f9b..676cf0e 100644
--- a/data/condo-brokers.json
+++ b/data/condo-brokers.json
@@ -3,6 +3,25 @@
   "id": "rdfGD26150149",
   "address": "250 N First St #524",
   "city": "Burbank",
+  "agents": [
+   {
+    "name": "Rosa Pena",
+    "firm": "JohnHart Real Estate",
+    "dre": "01358662",
+    "dre_record": {
+     "broker_dre": "01358662",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=01358662",
+     "dre_status": "LICENSED",
+     "dre_expiration": "11/11/26",
+     "dre_license_type": "SALESPERSON",
+     "responsible_broker": "JohnHart Corp 2428 FOOTHILL BLVD LA CRESCENTA, CA 91214",
+     "responsible_broker_id": "01873088",
+     "discipline": "none",
+     "dre_name": "Pena, Rosa M",
+     "_src": "dre-live"
+    }
+   }
+  ],
   "broker_name": "Rosa Pena",
   "firm_name": "JohnHart Real Estate",
   "broker_dre": "01358662",
@@ -20,13 +39,32 @@
    "dre_name": "Pena, Rosa M",
    "_src": "dre-live"
   },
-  "fetched_at": "2026-08-03T15:38:49.603Z",
+  "fetched_at": "2026-08-03T17:57:07.114Z",
   "http": 200
  },
  "rdfSR26126952": {
   "id": "rdfSR26126952",
   "address": "1620 N San Fernando #27",
   "city": "Burbank",
+  "agents": [
+   {
+    "name": "Vahe Patatanyan",
+    "firm": "CA Real Estate Group",
+    "dre": "02021367",
+    "dre_record": {
+     "broker_dre": "02021367",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=02021367",
+     "dre_status": "LICENSED MLO License Endorsement : 1595606 (Click here to check the status of the MLO License Endorsement.) Corporation License Issued: 01/23/17",
+     "dre_expiration": "01/22/29",
+     "dre_license_type": "CORPORATION",
+     "responsible_broker": "",
+     "responsible_broker_id": "",
+     "discipline": "none",
+     "dre_name": "CA Dream Builders Group, Inc.",
+     "_src": "dre-live"
+    }
+   }
+  ],
   "broker_name": "Vahe Patatanyan",
   "firm_name": "CA Real Estate Group",
   "broker_dre": "02021367",
@@ -44,13 +82,31 @@
    "dre_name": "CA Dream Builders Group, Inc.",
    "_src": "dre-live"
   },
-  "fetched_at": "2026-08-03T15:38:55.349Z",
+  "fetched_at": "2026-08-03T17:57:26.607Z",
   "http": 200
  },
  "rdfSR26040098": {
   "id": "rdfSR26040098",
   "address": "227 E Burbank Unit C",
   "city": "Burbank",
+  "agents": [
+   {
+    "name": "Danny Umana",
+    "firm": "Keller Williams World Media Center",
+    "dre": "01927654",
+    "dre_record": {
+     "broker_dre": "01927654",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=01927654",
+     "dre_status": "LICENSED",
+     "dre_expiration": "02/07/29",
+     "responsible_broker": "",
+     "responsible_broker_id": "",
+     "license_type": "Broker/Officer",
+     "license_city": "BURBANK",
+     "_src": "licensed-agents.json"
+    }
+   }
+  ],
   "broker_name": "Danny Umana",
   "firm_name": "Keller Williams World Media Center",
   "broker_dre": "01927654",
@@ -67,13 +123,32 @@
    "license_city": "BURBANK",
    "_src": "licensed-agents.json"
   },
-  "fetched_at": "2026-08-03T15:39:40.026Z",
+  "fetched_at": "2026-08-03T17:57:29.198Z",
   "http": 200
  },
  "rdfSB26163126": {
   "id": "rdfSB26163126",
   "address": "3130 Montrose Ave #106",
   "city": "Glendale",
+  "agents": [
+   {
+    "name": "Sung Lee",
+    "firm": "Keller Williams Palos Verdes",
+    "dre": "01938119",
+    "dre_record": {
+     "broker_dre": "01938119",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=01938119",
+     "dre_status": "LICENSED",
+     "dre_expiration": "07/30/29",
+     "dre_license_type": "SALESPERSON",
+     "responsible_broker": "D'Amico Palos Verdes Realty Inc 550 SILVER SPUR RD STE 310 RANCHO PALOS VERDES, CA 90275",
+     "responsible_broker_id": "01385864",
+     "discipline": "none",
+     "dre_name": "Lee, Sung J",
+     "_src": "dre-live"
+    }
+   }
+  ],
   "broker_name": "Sung Lee",
   "firm_name": "Keller Williams Palos Verdes",
   "broker_dre": "01938119",
@@ -91,13 +166,32 @@
    "dre_name": "Lee, Sung J",
    "_src": "dre-live"
   },
-  "fetched_at": "2026-08-03T15:39:45.091Z",
+  "fetched_at": "2026-08-03T17:57:31.569Z",
   "http": 200
  },
  "rdfGD26135592": {
   "id": "rdfGD26135592",
   "address": "522 W Stocker #6",
   "city": "Glendale",
+  "agents": [
+   {
+    "name": "Vartan Markarian",
+    "firm": "Markarian Realty",
+    "dre": "01059771",
+    "dre_record": {
+     "broker_dre": "01059771",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=01059771",
+     "dre_status": "LICENSED",
+     "dre_expiration": "01/05/29",
+     "dre_license_type": "BROKER",
+     "responsible_broker": "",
+     "responsible_broker_id": "",
+     "discipline": "none",
+     "dre_name": "Markarian, Vartan A",
+     "_src": "dre-live"
+    }
+   }
+  ],
   "broker_name": "Vartan Markarian",
   "firm_name": "Markarian Realty",
   "broker_dre": "01059771",
@@ -115,7 +209,7 @@
    "dre_name": "Markarian, Vartan A",
    "_src": "dre-live"
   },
-  "fetched_at": "2026-08-03T15:39:50.484Z",
+  "fetched_at": "2026-08-03T17:57:33.904Z",
   "http": 200
  },
  "rdfP1-27559": {
@@ -169,6 +263,25 @@
   "id": "rdfAR26164436",
   "address": "2450 E Del Mar Blvd #17",
   "city": "Pasadena",
+  "agents": [
+   {
+    "name": "Jason McClain",
+    "firm": "Cal State Realty Services",
+    "dre": "02080277",
+    "dre_record": {
+     "broker_dre": "02080277",
+     "dre_url": "https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id=02080277",
+     "dre_status": "LICENSED MLO License Endorsement : NMLS ID: 1972162 (Click here to check the status of the MLO License Endorsement )",
+     "dre_expiration": "12/05/26",
+     "dre_license_type": "SALESPERSON",
+     "responsible_broker": "C2 Financial Corporation 12230 EL CAMINO REAL STE # 100 SAN DIEGO, CA 92130",
+     "responsible_broker_id": "01821025",
+     "discipline": "none",
+     "dre_name": "McClain, Jason George",
+     "_src": "dre-live"
+    }
+   }
+  ],
   "broker_name": "Jason McClain",
   "firm_name": "Cal State Realty Services",
   "broker_dre": "02080277",
@@ -186,7 +299,7 @@
    "dre_name": "McClain, Jason George",
    "_src": "dre-live"
   },
-  "fetched_at": "2026-08-03T15:40:03.851Z",
+  "fetched_at": "2026-08-03T18:01:42.878Z",
   "http": 200
  },
  "rdfAR25152101": {
diff --git a/public/condos.html b/public/condos.html
index 5832d70..2111151 100644
--- a/public/condos.html
+++ b/public/condos.html
@@ -499,8 +499,18 @@ function openDetail(id){
     +line('$ / Sq Ft',ppsf!=null?money(ppsf):'')
     +line('Year built',c.year_built)
     +line('Age (yrs)',c.year_built?(NOW_YEAR-c.year_built):'')
-    +line('Broker',c.broker_name?`<a class="dl" href="/crcp.html?brokerName=${encodeURIComponent(c.broker_name)}">${esc(c.broker_name)}</a>`:c.broker_name)
-    +line('Firm',c.firm_name?`<a class="dl" href="/crcp.html?firm=${encodeURIComponent(c.firm_name)}">${esc(c.firm_name)}</a>`:c.firm_name)
+    +(function(){
+      // Record ALL license numbers on the listing: one row per agent (primary + co-listing agent),
+      // name→directory, firm→directory, DRE#→full CA DRE record. Falls back to the single broker.
+      const ags=(Array.isArray(c.agents)&&c.agents.length)?c.agents:((c.broker_name||c.broker_dre)?[{name:c.broker_name,firm:c.firm_name,dre:c.broker_dre,dre_record:(c.dre_url?{dre_url:c.dre_url}:null)}]:[]);
+      return ags.map((a,i)=>{
+        const nm=a.name?`<a class="dl" href="/crcp.html?brokerName=${encodeURIComponent(a.name)}">${esc(a.name)}</a>`:'';
+        const fm=a.firm?`${a.name?' · ':''}<a class="dl" href="/crcp.html?firm=${encodeURIComponent(a.firm)}">${esc(a.firm)}</a>`:'';
+        const u=a.dre?((a.dre_record&&a.dre_record.dre_url)||('https://www2.dre.ca.gov/PublicASP/pplinfo.asp?License_id='+a.dre)):'';
+        const dre=a.dre?` · <a class="dl" href="${esc(u)}" target="_blank" rel="noopener noreferrer" title="Full CA DRE license record">DRE# ${esc(a.dre)} ↗</a>`:'';
+        return line(i===0?'Listed by':'Co-agent', nm+fm+dre);
+      }).join('');
+    })()
     +line('Added',dateTimeSpan(c.created_at))
     +(c.source&&/^https?:/.test(c.source)?line('Listing',`<a class="dl" href="${esc(c.source)}" target="_blank" rel="noopener noreferrer">🔗 View listing ↗</a>`):'')
     +'</div>'
diff --git a/scripts/condos-report.js b/scripts/condos-report.js
index e78c05f..73d65ae 100644
--- a/scripts/condos-report.js
+++ b/scripts/condos-report.js
@@ -28,9 +28,10 @@ try {
 
 // Unwarrantable = fha_expired only.
 const expired = all.filter(c => c.warrantable_status === 'fha_expired');
-// Rank: most accessible discount plays first (lowest price), tie-break lowest $/sqft.
-const ppsf = c => (c.price && c.sqft) ? c.price / c.sqft : Infinity;
-expired.sort((a, b) => (a.price || Infinity) - (b.price || Infinity) || ppsf(a) - ppsf(b));
+// Date order (Steve 2026-08-03): newest-listed first — fewest days on market — so the freshest
+// unwarrantable plays lead. DOM-less listings sort last; tie-break by lowest price.
+const dom = c => (c.days_on_market != null && c.days_on_market !== '') ? +c.days_on_market : Infinity;
+expired.sort((a, b) => dom(a) - dom(b) || (a.price || Infinity) - (b.price || Infinity));
 
 const today = process.env.REPORT_DATE || new Date().toISOString().slice(0, 10);
 const fmt = n => n == null ? '—' : '$' + Math.round(n).toLocaleString();
@@ -80,7 +81,7 @@ const brokerLine = (c) => {
 
 const recap = (c, i) => `<div style="border-top:1px solid #e2e2e2;padding:10px 0">
   <div style="font-size:14px"><b>#${i + 1}. <a href="${c.source}">${c.address}</a>, ${c.city}</b></div>
-  <div style="color:#666;font-size:12px">${c.property_type || 'Condo'}${c.year_built ? ` · built ${c.year_built}` : ''} · ${fmt(c.price)}${c.sqft ? ` · ${fmt(c.price / c.sqft)}/sqft · ${c.sqft.toLocaleString()} sqft` : ''}${c.beds != null ? ` · ${c.beds}bd/${c.baths}ba` : ''}${c.hoa ? ` · HOA ${fmt(c.hoa)}/mo` : ''}</div>
+  <div style="color:#666;font-size:12px">${c.property_type || 'Condo'}${c.year_built ? ` · built ${c.year_built}` : ''} · ${fmt(c.price)}${c.sqft ? ` · ${fmt(c.price / c.sqft)}/sqft · ${c.sqft.toLocaleString()} sqft` : ''}${c.beds != null ? ` · ${c.beds}bd/${c.baths}ba` : ''}${c.hoa ? ` · HOA ${fmt(c.hoa)}/mo` : ''}${c.days_on_market != null ? ` · 🗓 ${c.days_on_market}d on mkt` : ''}</div>
   <div style="font-size:12px;color:#a15c00;margin:3px 0"><b>Why unwarrantable:</b> ${whyNote(c)}</div>
   ${brokerLine(c)}
   <div style="font-size:11px;color:#888">${(c.warrant_signals && c.warrant_signals.label) || 'FHA/VA-approval-based proxy, NOT lender-verified.'}</div>
@@ -114,7 +115,7 @@ const brokerBlock = `<div style="margin-top:22px;border:1px solid #e2e2e2;border
 const html = `<div style="font-family:-apple-system,Segoe UI,Arial,sans-serif;max-width:780px">
 <h2 style="margin:0 0 2px">Unwarrantable Condos — FHA-Lapsed Discount Plays</h2>
 <div style="color:#666;font-size:13px">${today} · LA County · ${expired.length} condo${expired.length === 1 ? '' : 's'} with lapsed FHA approval · ${all.length} condos screened</div>
-<p style="font-size:13px;color:#444;margin:12px 0">These condos were <b>previously FHA-approved</b> but the project's approval has <b>expired</b> — so FHA/VA (and often conventional) financing is unavailable until re-certified. That constrains the buyer pool to cash / portfolio lenders, which typically means a price discount and less competition. Ranked most-accessible first (lowest price).</p>
+<p style="font-size:13px;color:#444;margin:12px 0">These condos were <b>previously FHA-approved</b> but the project's approval has <b>expired</b> — so FHA/VA (and often conventional) financing is unavailable until re-certified. That constrains the buyer pool to cash / portfolio lenders, which typically means a price discount and less competition. Ordered newest-listed first (fewest days on market).</p>
 <p style="font-size:12px;color:#a15c00;margin:0 0 12px"><b>Honest labeling:</b> "unwarrantable" here is an <b>FHA-approval-based proxy</b> (HUD's public list), NOT a lender-verified Fannie/Freddie warrantability determination. Confirm project status + eligibility with a lender before acting. Excludes ${all.length - expired.length} condos that are FHA-approved or simply not on the list (unknown).</p>
 <table style="border-collapse:collapse;width:100%;font-size:13px;border:1px solid #ddd">
 <tr style="background:#f4f4f4;text-align:left">
diff --git a/scripts/enrich-condo-brokers.js b/scripts/enrich-condo-brokers.js
index 14d2ddd..9136fc2 100644
--- a/scripts/enrich-condo-brokers.js
+++ b/scripts/enrich-condo-brokers.js
@@ -204,7 +204,15 @@ async function main() {
         if (d) a.dre_record = d;
       }
     }
-    brokers[c.id] = { id: c.id, address: c.address, city: c.city, ...b, dre: dre || undefined, fetched_at: new Date().toISOString(), http: status };
+    // NEVER clobber good data with an empty scrape (WAF blocks return no broker). Only overwrite
+    // when this fetch actually yielded broker/agent data; on a block, preserve any prior record and
+    // just flag the miss if we had nothing before (so --only-missing can retry it later).
+    const gotData = b.broker_name || b.firm_name || (Array.isArray(b.agents) && b.agents.length);
+    if (gotData) {
+      brokers[c.id] = { id: c.id, address: c.address, city: c.city, ...b, dre: dre || undefined, fetched_at: new Date().toISOString(), http: status };
+    } else if (!brokers[c.id] || !(brokers[c.id].broker_name || brokers[c.id].broker_dre)) {
+      brokers[c.id] = { id: c.id, address: c.address, city: c.city, fetched_at: new Date().toISOString(), http: status, blocked: true };
+    }
     fs.writeFileSync(BROKERS, JSON.stringify(brokers, null, 1));
     process.stdout.write(`\r  ${done}/${targets.length}  broker:${gotBroker}  dre:${gotDre}  blocked:${blocked.length}   `);
     await sleep(jitter());

← c0235f6 index broker-line: tighten DRE link guard /^d{7,8}/ -> /^d{8  ·  back to Commercialrealestate  ·  condos: rebuild + send date-ordered all-licenses report (msg 67623f3 →