A modular Node.js + Playwright scraper for public retail product pages and resale-comparison analysis.
The Best Buy adapter is now isolated in src/adapters/bestbuy.js.
npm run scan -- --query "drill" --max-items-per-store 10 --min-profit-pct 50 --top-n 10 --json-out output/drill-test.json --refresh--clearance now uses Best Buy's actual Clearance Electronics Outlet page:
https://www.bestbuy.com/site/outlet-refurbished-clearance/clearance-electronics/pcmcat748300666044.c?id=pcmcat748300666044
npm run scan -- --clearance --max-items-per-store 10 --min-profit-pct 50 --top-n 10 --json-out output/clearance-test.json --refreshnpm run scan -- --deals --max-items-per-store 10 --min-profit-pct 50 --top-n 10 --json-out output/deals-test.json --refreshDeals mode checks Top Deals, Deal of the Day, and the Best Buy Clearance page.
The scraper extracts the SKU from the supplied URL and searches Best Buy for that SKU instead of directly navigating to the fragile /openbox product endpoint.
npm run scan -- --best-buy-url "https://www.bestbuy.com/product/lenovo-ideapad-slim-3i-15-6-full-hd-laptop-intel-core-i3-n305-2023-8gb-memory-128gb-storage-arctic-grey/6610891/openbox?condition=fair" --max-items-per-store 10 --min-profit-pct 50 --top-n 10 --json-out output/bestbuy-lenovo.json --refreshsrc/flip-finder.js— small CLI/orchestrator and final report outputsrc/config.js— CLI arguments, cache, store/radius utilities, shared helperssrc/scanner.js— scan pipeline and retailer orchestrationsrc/adapters/bestbuy.js— all Best Buy scraping logicsrc/adapters/ebay-sold.js— sold-comps API adaptersrc/matching/text.js— product text, identifiers, categories, sellabilitysrc/matching/engine.js— product identity and profit matchingsrc/matching/sold.js— sold-comparable matching helperssrc/matching/candidates.js— candidate construction and diagnosticssrc/matching/index.js— matching module exportsdata/stores.csv— local store data
- Keep your existing
.envin the project root. Do not replace it with.env.example. - Install dependencies if needed:
npm install
npx playwright install chromium- Run one of the commands above.
The ZIP intentionally does not include node_modules, .venv, .git, generated output reports, or your .env credentials.