Skip to content

silkietools/demo-compute-modules-scraper-milwaukee-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

demo-compute-modules-scraper-milwaukee-ts

TypeScript Palantir Compute Module demo that scrapes Milwaukee product data and returns structured tool metadata.

TypeScript Playwright Compute Module Docker License: MIT

What It Does

  • Exposes compute-module functions for Milwaukee scraping workflows.
  • Scrapes product title, description, specs, features, included items, and image URLs.
  • Provides both structured JSON output and formatted text output.
  • Includes a local smoke test script for a known MPN (2880-20).

How It Works

  • src/scrapers/MilwaukeeScraper.ts uses Playwright to load Milwaukee product pages and extract fields.
  • src/index.ts registers compute module handlers: addOne, scrapeMilwaukee, scrapeMilwaukeeFormatted.
  • src/utils/formatProductData.ts renders scraped records into a readable text block.

API Surface

Function Input Output Notes
addOne { value: number } { value: number } Basic sample handler.
scrapeMilwaukee { mpn: string } structured product object Returns success: false with empty fields on scrape failure.
scrapeMilwaukeeFormatted { mpn: string } string Formatted product summary text.

Quick Start

./startup.sh
source startup.sh
npm install
npm run build
npm start

Run local smoke test:

npm test

Testing And CI

Layer Present Tooling Runs in CI
unit no none no
integration yes npm test (ts-node src/test.ts) no
e2e api no none no
e2e web no none no

No CI workflow is currently configured in this repository.

Deployment And External Services

  • Containerized runtime is provided via Dockerfile.
  • Scraping depends on public Milwaukee product pages at https://www.milwaukeetool.com/products/<mpn>.

License

MIT (LICENSE).

About

TypeScript Milwaukee retail data scraper demo with compute modules; ingestion reference for SMB commerce automation.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors