c59d55529f
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>
37 lines
1.3 KiB
XML
37 lines
1.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<!--
|
|
Standalone workstation tool — deliberately NOT part of PowderCoating.sln.
|
|
Build/publish independently and run on a machine you control (Task Scheduler),
|
|
never on the deployed app server. Scrapes Prismatic Powders and pushes the
|
|
result into the app's catalog import endpoint.
|
|
|
|
First-time setup on a workstation:
|
|
dotnet build
|
|
pwsh bin/Debug/net8.0/playwright.ps1 install chromium
|
|
-->
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net8.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<AssemblyName>PrismaticSync</AssemblyName>
|
|
<RootNamespace>PrismaticSync</RootNamespace>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Playwright" Version="1.49.0" />
|
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
|
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Update="appsettings.json">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</None>
|
|
</ItemGroup>
|
|
|
|
</Project>
|