FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
How to screenshot every page in your sitemap automatically
How-ToWeb Development

How to screenshot every page in your sitemap automatically

via Dev.to WebdevCustodia-Admin1mo ago

How to Screenshot Every Page in Your Sitemap Automatically Visual audits, site archives, client deliverables, pre-migration snapshots — all require screenshots of every page on a site. Doing it manually takes hours. Doing it with Puppeteer means managing a browser pool and handling concurrency yourself. Here's a script that parses your sitemap.xml and captures every URL with controlled concurrency and automatic retry. Basic sitemap crawler import fs from " fs/promises " ; import path from " path " ; const PAGEBOLT_API_KEY = process . env . PAGEBOLT_API_KEY ; const SITEMAP_URL = process . env . SITEMAP_URL || " https://yoursite.com/sitemap.xml " ; const OUTPUT_DIR = " screenshots " ; const CONCURRENCY = 3 ; // parallel requests const DELAY_MS = 500 ; // between batches async function fetchSitemap ( url ) { const res = await fetch ( url ); const xml = await res . text (); // Extract all <loc> URLs const urls = [... xml . matchAll ( /<loc> ([^ < ] + ) < \/ loc>/g )]. map (( m ) => m [ 1 ]

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
13 views

Related Articles

150 million users later, Roblox competitor Rec Room is shutting down
How-To

150 million users later, Roblox competitor Rec Room is shutting down

The Verge • 3d ago

Here are our favorite spring cleaning deals from Amazon’s Big Spring Sale
How-To

Here are our favorite spring cleaning deals from Amazon’s Big Spring Sale

The Verge • 3d ago

What we’re looking for in Startup Battlefield 2026 and how to put your best application forward
How-To

What we’re looking for in Startup Battlefield 2026 and how to put your best application forward

TechCrunch • 3d ago

Build Days That Actually Mean Something
How-To

Build Days That Actually Mean Something

Medium Programming • 3d ago

I have blogged about the difference between code coverage and test coverage and why it matters to distinguish between these 2.
How-To

I have blogged about the difference between code coverage and test coverage and why it matters to distinguish between these 2.

Dev.to Beginners • 4d ago

Discover More Articles