← back to Designer Wallcoverings
auto-save: 2026-07-30T08:16:08 (3 files) — scripts/wallquest-refresh/_db_scrape.cjs scripts/wallquest-refresh/_wq_scrape.cjs shopify/zero-price-guard-canary-snapshot.json
94c7e1fe5bbad7a86de90195ff82683b67028455 · 2026-07-30 08:16:15 -0700 · Steve Abrams
Files touched
M scripts/wallquest-refresh/_db_scrape.cjsM scripts/wallquest-refresh/_wq_scrape.cjsA shopify/zero-price-guard-canary-snapshot.json
Diff
commit 94c7e1fe5bbad7a86de90195ff82683b67028455
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jul 30 08:16:15 2026 -0700
auto-save: 2026-07-30T08:16:08 (3 files) — scripts/wallquest-refresh/_db_scrape.cjs scripts/wallquest-refresh/_wq_scrape.cjs shopify/zero-price-guard-canary-snapshot.json
---
scripts/wallquest-refresh/_db_scrape.cjs | 4 ++++
scripts/wallquest-refresh/_wq_scrape.cjs | 4 ++++
shopify/zero-price-guard-canary-snapshot.json | 1 +
3 files changed, 9 insertions(+)
diff --git a/scripts/wallquest-refresh/_db_scrape.cjs b/scripts/wallquest-refresh/_db_scrape.cjs
index a42ca9ff..3766d6c9 100644
--- a/scripts/wallquest-refresh/_db_scrape.cjs
+++ b/scripts/wallquest-refresh/_db_scrape.cjs
@@ -18,6 +18,10 @@ const out=fs.createWriteStream(OUT,{flags:'a'});
try{const s=await bb.sessions.create({projectId:process.env.BROWSERBASE_PROJECT_ID,proxies:true,browserSettings:{solveCaptchas:true}});
br=await chromium.connectOverCDP(s.connectUrl);const ctx=br.contexts()[0];const page=ctx.pages()[0]||await ctx.newPage();
if(!await loginV(page)){console.error('login fail chunk '+i);continue;}
+ // COST FIX (2026-07-30): only the image URL *string* is read below, never the pixels —
+ // blocking image/media/font bytes cuts residential-proxy GB ~80% with no data-integrity hit.
+ // Placed AFTER login so captcha/login rendering is unaffected.
+ if(process.env.BB_BLOCK_IMAGES!=='0') await ctx.route('**/*',r=>{const t=r.request().resourceType();return (t==='image'||t==='media'||t==='font')?r.abort():r.continue();});
for(const it of chunk){try{
if(!await goto(page,'https://www.wallquest.com/'+it.code)){out.write(JSON.stringify({code:it.code,nav:0})+'\n');done++;continue;}
await page.waitForTimeout(14000);
diff --git a/scripts/wallquest-refresh/_wq_scrape.cjs b/scripts/wallquest-refresh/_wq_scrape.cjs
index c8406744..24aa5bcb 100644
--- a/scripts/wallquest-refresh/_wq_scrape.cjs
+++ b/scripts/wallquest-refresh/_wq_scrape.cjs
@@ -16,6 +16,10 @@ const items=JSON.parse(fs.readFileSync(IN,'utf8'));fs.writeFileSync(OUT,'');cons
try{const s=await bb.sessions.create({projectId:process.env.BROWSERBASE_PROJECT_ID,proxies:true,browserSettings:{solveCaptchas:true}});
br=await chromium.connectOverCDP(s.connectUrl);const ctx=br.contexts()[0];const page=ctx.pages()[0]||await ctx.newPage();
if(!await loginV(page)){console.error('login fail chunk '+i);continue;}
+ // COST FIX (2026-07-30): only the image URL *string* is read below, never the pixels —
+ // blocking image/media/font bytes cuts residential-proxy GB ~80% with no data-integrity hit.
+ // Placed AFTER login so captcha/login rendering is unaffected.
+ if(process.env.BB_BLOCK_IMAGES!=='0') await ctx.route('**/*',r=>{const t=r.request().resourceType();return (t==='image'||t==='media'||t==='font')?r.abort():r.continue();});
for(const it of chunk){try{if(!await goto(page,'https://www.wallquest.com/'+it.code)){out.write(JSON.stringify({code:it.code,name:it.name,nav:0})+'\n');done++;continue;}
await page.waitForTimeout(14000);
const x=await page.evaluate(()=>{const pv=(([...document.querySelectorAll('[class*=price-value]')][0]||{}).textContent)||'';const price=(pv.match(/[\d,]+\.\d{2}/)||[])[0]||null;const specs={};document.querySelectorAll('.spec-name').forEach(sn=>{const v=sn.nextElementSibling;if(v)specs[sn.innerText.trim()]=v.innerText.trim();});const img=(document.querySelector('a[data-full-image-url]')||{}).getAttribute?.('data-full-image-url')||(document.querySelector('#cloudZoomImage')||{}).src||'';const title=(document.querySelector('h1,.product-name')||{}).innerText||'';return{price:price?price.replace(',',''):null,material:specs.Material||null,width:specs['Roll Width']||specs.Width||null,img,title:(title||'').trim()};});
diff --git a/shopify/zero-price-guard-canary-snapshot.json b/shopify/zero-price-guard-canary-snapshot.json
new file mode 100644
index 00000000..eeb7f893
--- /dev/null
+++ b/shopify/zero-price-guard-canary-snapshot.json
@@ -0,0 +1 @@
+{"variant_id":44494274199603,"inventory_item_id":46607684862003,"location_id":5795643504,"before":{"inventory_policy":"continue","inventory_quantity":2026}}
← 02e1549a auto-save: 2026-07-30T07:45:45 (3 files) — package-lock.json
·
back to Designer Wallcoverings
·
auto-save: 2026-07-30T08:46:20 (1 files) — shopify/discontin 0da60c38 →