Web Scraping Script Pack
Ten self-contained Node.js scripts built on Playwright, each one a pattern you end up rewriting anyway: paginated tables to CSV, infinite-scroll collectors, login with saved storageState, price and stock monitors that ping a Slack or Discord webhook on change, bulk form submission from CSV, job board scraping with cross-run dedupe, a sitemap crawler that honors robots.txt and crawl-delay, screenshot diffing with sha256 change detection, JSONL API polling, and a retry wrapper with backoff, jitter, and Retry-After handling.
Each file runs on its own, opens with a how-to-run comment, and marks the selectors you need to edit. Node 18+ with built-in fetch, one npm install, one chromium download. Nothing uploads anywhere; no accounts or API keys.
Permission note from the pack: the login script (03) and the form submitter (05) are for sites you own or have written permission to use.
Sample preview
All 10 scripts. Full pack carries the runnable files plus a smoke test.
| File | What it does |
|---|---|
| 01-paginated-table-to-csv.js | Walks ?page=N or Next-button pagination, saves table rows to CSV |
| 02-infinite-scroll-collector.js | Scrolls a feed to the end, dedupes, saves JSON |
| 03-login-scrape-storagestate.js | Logs in once, saves the session, reuses it on later runs |
| 04-price-stock-monitor.js | Diff-based product monitor, POSTs a Slack/Discord webhook on change |
| 05-bulk-form-submitter.js | CSV rows in, one form submission per row, results report |
| 06-job-board-scraper.js | Board/listing pages to JSON with cross-run dedupe |
| 07-sitemap-crawler.js | Expands sitemap indexes, honors robots.txt and crawl-delay, writes JSONL |
| 08-screenshot-diff-bot.js | sha256 change detection with archived previous shots |
| 09-api-poller-jsonl.js | Polls a JSON endpoint, appends new records to JSONL |
| 10-retry-fetch-wrapper.js | Exponential backoff, jitter, UA rotation, Retry-After aware |
Deciding between a hosted platform and running scripts yourself? The web scraping tools comparison covers cloud pricing models (Apify and similar) against this one-time pack.
Sample files
- sample.json10 scripts, agent-readable · 1.3 KB
- sample.csv10 scripts · 888 B
- scripts-manifest.jsonfull manifest with runtime notes · 1.6 KB
Full pack: all 10 runnable scripts, package.json, smoke test, README with quick start. Checkout and download run through Getly.