← back to Designer Wallcoverings
wallquest crawl: priced-first ordering + full-catalog (every SKU) run — active prices secured first, discontinued sweep last; resumable
52637906610287449454e16e9e4128da31ab3834 · 2026-07-06 14:38:38 -0700 · Steve
Files touched
M scripts/wallquest-refresh/scrape-realchrome.cjs
Diff
commit 52637906610287449454e16e9e4128da31ab3834
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Jul 6 14:38:38 2026 -0700
wallquest crawl: priced-first ordering + full-catalog (every SKU) run — active prices secured first, discontinued sweep last; resumable
---
scripts/wallquest-refresh/scrape-realchrome.cjs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/wallquest-refresh/scrape-realchrome.cjs b/scripts/wallquest-refresh/scrape-realchrome.cjs
index 69b3511d..ce76635a 100644
--- a/scripts/wallquest-refresh/scrape-realchrome.cjs
+++ b/scripts/wallquest-refresh/scrape-realchrome.cjs
@@ -20,7 +20,7 @@ const PWAIT=parseInt(process.env.WQ_PWAIT||'14000');
const goto=async(p,u)=>{for(let i=0;i<3;i++){try{await p.goto(u,{waitUntil:'domcontentloaded',timeout:45000});return 1;}catch(e){await sleep(3000);}}return 0;};
const priceFilter=process.env.WQ_ONLY_PRICED?'AND price_retail>0':''; // pilot pricing on ACTIVE SKUs
-let rows=q(`SELECT mfr_sku||'|'||product_url FROM wallquest_catalog WHERE product_url ~ 'wallquest.com' ${priceFilter} ORDER BY (price_retail IS NULL OR price_retail=0) DESC, mfr_sku;`).split('\n').filter(Boolean).map(l=>{const[sku,url]=l.split('|');return{sku,url};});
+let rows=q(`SELECT mfr_sku||'|'||product_url FROM wallquest_catalog WHERE product_url ~ 'wallquest.com' ${priceFilter} ORDER BY (price_retail IS NULL OR price_retail=0) ASC, mfr_sku;`).split('\n').filter(Boolean).map(l=>{const[sku,url]=l.split('|');return{sku,url};});
if(process.env.WQ_LIMIT)rows.splice(parseInt(process.env.WQ_LIMIT));
const extract=p=>p.evaluate(()=>{const Q=s=>[...document.querySelectorAll(s)];const specs={};Q('.spec-name').forEach(n=>{const v=n.nextElementSibling;if(v)specs[n.textContent.trim()]=v.textContent.trim();});const imgs=[...new Set(Q('a[data-full-image-url]').map(a=>a.getAttribute('data-full-image-url')).concat(Q('#cloudZoomImage,.picture img').map(i=>i.src)))].filter(u=>u&&/jpe?g|png/i.test(u));const pv=((Q('[class*=price-value]')[0]||{}).textContent||'').match(/[\d,]+\.\d{2}/);const discontinued=!!document.querySelector('.discontinued-product')||/no longer available/i.test(document.body.innerText);return{specs,imgs:imgs.slice(0,20),priceValue:pv?pv[0]:null,discontinued};});
← 98abb531 Luxuria retitle dry-run tool — color:tag path proven lossy/c
·
back to Designer Wallcoverings
·
Daisy Bennett: room-QA sweep (Gemini vision) — 62/62 rooms, 3c20ad3b →