Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For repeatable bulk screenshots, use a browser-automation script that reads a URL list, installs request-blocking rules before each navigation, and saves each capture under a unique filename. With Playwright, configure the browser context to block service workers if you rely on page.route(): Playwright says service-worker-intercepted requests are not handled by that routing mechanism. Blocking ads and trackers depends on the rules you choose; request interception alone does not guarantee that every tracking technique is stopped.

Choose a capture approach

Approach What it supports What to plan for
Playwright that you run Navigate to pages, intercept matching requests, and save viewport or full-page screenshots. You manage browser setup, batch orchestration, output naming, filtering rules, and service-worker behavior.
Cloudflare Browser Run snapshot A managed /snapshot endpoint can return rendered page content and a screenshot in one request; its capture format and options are configurable. The documented example accepts a URL or HTML, not a bulk URL list in one call. Check current account or Workers-binding requirements, limits, pricing, and data-handling terms in Cloudflare Browser Run documentation.

For a list of URLs that you need to process in one repeatable workflow, Playwright gives you direct control over the loop and output files. Cloudflare’s snapshot endpoint is a managed capture option, but the cited documentation does not establish bulk-list processing. For a ready-made screenshot API with batch capture, see ScreenshotNeo.

Build a Playwright batch capture

The example below shows the core workflow: read one URL per line, set up request interception before navigation, capture each page, and log failures without abandoning the rest of the list. The URL loop, filenames, and rule matching are implementation guidance built on Playwright’s documented navigation, routing, and screenshot APIs; this exact script has not been tested. Use a maintained filtering source appropriate to your needs rather than treating the sample matching logic as a complete ad or tracker blocklist.

Install Playwright

In a new Node.js project, install Playwright and its browser:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.
npm init -y
npm install playwright
npx playwright install chromium

Create urls.txt with one complete URL per line. Keep blank lines out of the input or let the script ignore them. The sample uses a minimal illustrative hostname rule; replace it with an actively maintained rule set, and review the matches because blocking required site resources can break page rendering.

Run the capture script

const fs = require('node:fs/promises');
const path = require('node:path');
const { chromium } = require('playwright');

const inputPath = process.argv[2] || 'urls.txt';
const outputDir = process.argv[3] || 'screenshots';
const timeoutMs = Number(process.env.NAVIGATION_TIMEOUT_MS || 45000);

// Illustrative only: replace with maintained rules suitable for your task.
const blockedHostSuffixes = ['ads.example', 'tracker.example'];

function shouldBlock(urlString) {
  let hostname;
  try {
    hostname = new URL(urlString).hostname.toLowerCase();
  } catch {
    return false;
  }
  return blockedHostSuffixes.some(host =>
    hostname === host || hostname.endsWith(`.${host}`)
  );
}

function outputName(url, index) {
  const safeHost = new URL(url).hostname.replace(/[^a-z0-9.-]/gi, '_');
  return `${String(index + 1).padStart(4, '0')}-${safeHost}.png`;
}

(async () => {
  const urls = (await fs.readFile(inputPath, 'utf8'))
    .split(/r?n/)
    .map(line => line.trim())
    .filter(Boolean);

  await fs.mkdir(outputDir, { recursive: true });
  const browser = await chromium.launch({ headless: true });
  const context = await browser.newContext({
    viewport: { width: 1365, height: 900 },
    serviceWorkers: 'block'
  });
  const failures = [];

  try {
    for (let i = 0; i < urls.length; i++) {
      const url = urls[i];
      let parsed;
      try {
        parsed = new URL(url);
        if (!['http:', 'https:'].includes(parsed.protocol)) {
          throw new Error('URL must use http or https');
        }
      } catch (error) {
        failures.push({ url, error: error.message });
        continue;
      }

      const page = await context.newPage();
      try {
        await page.route('**/*', route => {
          if (shouldBlock(route.request().url())) return route.abort();
          return route.continue();
        });

        await page.goto(url, { waitUntil: 'domcontentloaded', timeout: timeoutMs });
        await page.screenshot({
          path: path.join(outputDir, outputName(url, i)),
          fullPage: true
        });
      } catch (error) {
        failures.push({ url, error: error.message });
      } finally {
        await page.close();
      }
    }
  } finally {
    await context.close();
    await browser.close();
  }

  await fs.writeFile(
    path.join(outputDir, 'failures.json'),
    JSON.stringify(failures, null, 2)
  );
  process.exitCode = failures.length ? 1 : 0;
})();

Save it as capture.js and run node capture.js urls.txt screenshots. Successful captures are written as numbered PNG files, and failures are recorded in screenshots/failures.json. The example intentionally uses domcontentloaded so it does not wait indefinitely for every network request to finish; that can mean late content is absent. Choose a wait condition that suits the pages you capture.

Rank #2
Sale
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Adapt the loop for your own batch

  • Use unique output names. The example prefixes the hostname with the input position, so two URLs on the same host do not overwrite one another. If you need stable names across reordered input, include a sanitized path or a hash of the full URL.
  • Keep failures per URL. A malformed URL or navigation failure should be logged, not cause the remaining batch to be discarded. Review the failure file and rerun only the URLs that need another attempt.
  • Choose context reuse deliberately. This sample reuses a browser context, so cookies and other context-level state can carry between pages. Use a separate context per URL if isolation matters; that changes overhead and should be weighed against your privacy and reproducibility requirements.
  • Make captures comparable. Keep viewport, browser settings, wait condition, and screenshot scope consistent between runs. Record any changes alongside the output.

Block ads and trackers without breaking the page

Playwright’s page.route() lets a script inspect requests and abort those matching your rules. Add routing before page.goto() so it is in place before page resources are requested. Playwright documents an important limitation: requests intercepted by service workers are not intercepted by page.route(); its documentation recommends blocking service workers when request interception is required. The example sets serviceWorkers: 'block' on the browser context for that reason.

A request filter is only as good as its rules. A rule list may miss tracking methods that do not match blocked request URLs, and aggressive rules can block first-party scripts, images, or APIs needed to render the page. There is no universal guarantee that a browser-routing setup removes every ad or tracker. Keep the rules updateable, inspect broken captures, and distinguish blocked-resource effects from ordinary site failures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
ASUS RT-AX1800S Dual Band WiFi 6 Extendable Router, Subscription-Free Network Security, Parental Control, Built-in VPN, AiMesh Compatible, Gaming & Streaming, Smart Home
  • New-Gen WiFi Standard – WiFi 6(802.11ax) standard supporting MU-MIMO and OFDMA technology for better efficiency and throughput.Antenna : External antenna x 4. Processor : Dual-core (4 VPE). Power Supply : AC Input : 110V~240V(50~60Hz), DC Output : 12 V with max. 1.5A current.
  • Ultra-fast WiFi Speed – RT-AX1800S supports 1024-QAM for dramatically faster wireless connections
  • Increase Capacity and Efficiency – Supporting not only MU-MIMO but also OFDMA technique to efficiently allocate channels, communicate with multiple devices simultaneously
  • 5 Gigabit ports – One Gigabit WAN port and four Gigabit LAN ports, 10X faster than 100–Base T Ethernet.
  • Commercial-grade Security Anywhere – Protect your home network with AiProtection Classic, powered by Trend Micro. And when away from home, ASUS Instant Guard gives you a one-click secure VPN.

Choose screenshot scope and timing

Viewport or full page

page.screenshot() captures the visible browser area by default. Setting fullPage: true captures the full scrollable document in a taller image, which is useful for review or archiving but can produce very large files. Playwright documents full-page screenshots and saving them to a path or buffer in its screenshot guide. Use viewport captures when you need a consistent fixed-size comparison; use full-page captures when content below the fold matters.

Wait conditions

Pages can render content after initial navigation. The sample waits for domcontentloaded; alternatives such as waiting for a specific selector, a fixed delay, or network idle can fit particular sites, but no wait condition works for every page. Cloudflare’s snapshot example shows configurable navigation options including a wait condition and timeout. Choose a condition that reflects the content you need, and keep it the same across comparable runs.

Rank #4
TP-Link AXE5400 Tri-Band WiFi 6E Router, 2025 PCMag Editors' Choice
  • Tri-Band WiFi 6E Router - Up to 5400 Mbps WiFi for faster browsing, streaming, gaming and downloading, all at the same time(6 GHz: 2402 Mbps;5 GHz: 2402 Mbps;2.4 GHz: 574 Mbps)
  • WiFi 6E Unleashed – The 6 GHz band brings more bandwidth, faster speeds, and near-zero latency; Enables more responsive gaming and video chatting
  • Connect More Devices—True Tri-Band and OFDMA technology increase capacity by 4 times to enable simultaneous transmission to more devices
  • Unique Design, More RAM, Better Processing - A unique housing design provides optimal heat dissipation, combined with a 1.0 GHz dual-core CPU and 512 MB High-Speed Memory, the AXE75 is designed for long-term reliability and performance.
  • EasyMesh-compatible - Extend network range even more by adding EasyMesh-compatible routers, extenders, or wireless powerline adapters for a seamless, whole-home connection. Eliminate dead zones, drops, and lag as you move across your home.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot incomplete or failed captures

  • The screenshot is blank or missing content: Check whether the page needs more time, a selector to appear, or a different readiness condition. Also check whether a blocked script or request is necessary to render the page.
  • Routing does not block a request: If a service worker handles it, Playwright says page.route() will not intercept it. Set the context’s serviceWorkers option to 'block' when interception is required.
  • Pages break after filtering: Temporarily narrow the rules and compare the result. A filter may have matched a required first-party or third-party resource; refine the rule rather than assuming every blocked host is an ad or tracker.
  • Navigation times out: Some pages keep connections open or load slowly. Adjust the timeout and wait condition for the use case, and keep a failure record so one slow URL does not erase successful results.
  • Files overwrite each other: Include an input index or another unique component in every filename. Hostnames alone are not unique when the list contains multiple pages from the same site.
  • A full-page image is unwieldy: Switch to a viewport capture for a fixed-size result, or use a PDF workflow if the output needs pagination. A full-page screenshot is one tall image, not a paginated document.

Or skip the browser setup

ScreenshotNeo accepts a URL in one GET request and returns a screenshot or PDF. For batch work, its bulk capture option accepts up to 100 URLs per call. Its clean-shot steps accept cookie or consent banners and remove 60+ known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. It also provides an MCP server with screenshot tools for AI agents.

Example cURL request (see the ScreenshotNeo API documentation for setup and options):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo includes 1,000 screenshots a month on its free plan with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

Best Value
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
  • Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
  • Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
  • Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
  • MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home

Frequently Asked Questions

Does request interception guarantee that every tracker is blocked?

No. The result depends on the matching rules and browser configuration, and the cited Playwright API documentation does not establish comprehensive tracker removal.

Can I use a Cloudflare snapshot request to submit a whole URL list at once?

The cited Cloudflare Browser Run documentation describes a snapshot request for a URL or HTML and does not establish bulk-list input.

Quick Recap

SaleBestseller No. 1
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
VPN SERVER: Archer AX21 Supports both Open VPN Server and PPTP VPN Server
$59.98
SaleBestseller No. 2
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
$24.32
Bestseller No. 5
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
$44.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.