Add PrismaticSync console tool for unattended Prismatic catalog sync
Standalone .NET 8 console app (not part of the main solution) that scrapes the Prismatic Powders catalog via Playwright and pushes it into the app's catalog import. Prismatic has no API, so this runs on a workstation (Task Scheduler), never the deployed server. - Discovery: incremental newest-first via ?category=created_at (stops once it reaches already-known URLs — cheap, finds new colors) and a full all-colors crawl for occasional reconcile. - Scraper: resumable product-page scrape (sku/color/description/price tiers/ SDS/TDS/app-guide/image), with --refresh-older-than to re-scrape stale products and catch price changes. Output matches the app import format so it flows through the same shared upsert as the Columbia sync. - Resilience: brisk randomized base delay, escalating 403 cooldown-and-retry to avoid hard bans, periodic rest. All configurable. - Visibility: streams every product + the inter-product wait to the console (colored) and a log file, with an up-front ETA. - Push: token-authenticated POST to the app import endpoint (skips to manual upload when unconfigured). The app-side token import endpoint is a separate follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"Sync": {
|
||||
"BaseUrl": "https://www.prismaticpowders.com",
|
||||
"ColorsPath": "/shop/powder-coating-colors",
|
||||
|
||||
"ProductUrlsFile": "product-urls.txt",
|
||||
"OutputJsonFile": "prismatic_powders.json",
|
||||
"LogFile": "prismatic-sync.log",
|
||||
|
||||
"MinDelaySeconds": 6,
|
||||
"MaxDelaySeconds": 14,
|
||||
"PageSettleSeconds": 4,
|
||||
|
||||
"BlockedCooldownSeconds": 120,
|
||||
"BlockedCooldownMaxSeconds": 600,
|
||||
"BlockedMaxRetries": 3,
|
||||
"LongRestEveryProducts": 150,
|
||||
"LongRestSeconds": 45,
|
||||
|
||||
"ScrollWaitMs": 1500,
|
||||
"MaxScrolls": 400,
|
||||
"StopAfterNoNewScrolls": 10,
|
||||
"StopAfterKnownScrolls": 8,
|
||||
|
||||
"ColorParams": [
|
||||
"pris_black", "pris_blue", "pris_bronze", "pris_brown", "pris_clear",
|
||||
"pris_copper", "pris_gold", "pris_gray", "pris_green", "pris_orange",
|
||||
"pris_pink", "pris_purple", "pris_red", "pris_silver", "pris_tan",
|
||||
"pris_white", "pris_yellow"
|
||||
],
|
||||
|
||||
"Import": {
|
||||
"EndpointUrl": "",
|
||||
"Token": "",
|
||||
"VendorName": "Prismatic Powders"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user