Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk7 min

How to Bulk Capture Screenshots After Dismissing Cookie Banners

A practical Playwright workflow for capturing many pages after handling site-specific cookie banners, with capture choices, state-safety notes, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright to process a URL list in a browser context: open each page, handle that site’s consent interface, verify it has closed, wait for the content you need, and save the screenshot under a predictable filename. There is no universal cookie-banner selector, so consent handling must be tailored to each site. For managed capture instead, ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents.

Build a repeatable Playwright batch

The basic loop is URL → navigation → consent handling → readiness check → screenshot → result logging. A shared browser context can reduce setup overhead, but do not assume unrelated sites use the same consent controls or share a consent choice. The example below is a runnable Node.js starting point. Replace the consent locator and readiness selector with values that match the target site.

Install Playwright

  1. Create a project and install Playwright: npm init -y, then npm install playwright.

    As an Amazon Associate I earn from qualifying purchases.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Save the script below as capture.mjs and run it with node capture.mjs. It creates an output directory and processes the example URLs.

Node.js batch example

import { chromium } from 'playwright';
import fs from 'node:fs/promises';

const urls = [
  'https://example.com',
  'https://www.example.org',
];

const outputDir = 'output';
await fs.mkdir(outputDir, { recursive: true });
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({ viewport: { width: 1440, height: 900 } });

function fileName(url, index) {
  const parsed = new URL(url);
  const slug = `${parsed.hostname}${parsed.pathname}`
    .replace(/[^a-z0-9]+/gi, '-')
    .replace(/^-|-$/g, '')
    .slice(0, 100);
  return `${String(index + 1).padStart(3, '0')}-${slug || 'page'}.png`;
}

for (const [index, url] of urls.entries()) {
  const page = await context.newPage();
  let status = null;
  let consent = 'not configured';
  try {
    const response = await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 45000 });
    status = response?.status() ?? null;

    // Replace this locator with the site's actual, appropriately scoped control.
    const consentButton = page.getByRole('button', { name: 'Accept all cookies', exact: true });
    if (await consentButton.isVisible().catch(() => false)) {
      await consentButton.click();
      consent = 'clicked';
      // Replace with the site's banner/dialog locator to verify it is gone.
      await page.getByRole('dialog').waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
    } else {
      consent = 'button not visible';
    }

    // Replace with an element that indicates the content you need is ready.
    await page.locator('main').waitFor({ state: 'visible', timeout: 15000 }).catch(() => {});
    await page.screenshot({ path: `${outputDir}/${fileName(url, index)}`, fullPage: true });
    console.log(JSON.stringify({ url, status, consent, result: 'saved' }));
  } catch (error) {
    console.error(JSON.stringify({ url, status, consent, result: 'failed', error: String(error) }));
  } finally {
    await page.close();
  }
}

await browser.close();

The example uses domcontentloaded to begin processing once the initial document has been parsed, then waits for a page-specific element. Its broad example locators are not universal: if the site has no main element or its button wording differs, replace them. The dialog wait is also an example; use the actual banner or dialog locator when possible and make a missing or still-visible banner explicit in your logs rather than treating a click as proof of success.

Use a careful consent action

Choose the control that matches the task and applicable instructions. A button that closes a banner may also record a consent preference; “accept all” is not interchangeable with dismissing a visual overlay. Prefer accessible roles and names, scoped to the consent interface where possible. Verify that the overlay is no longer visible before capturing.

Choose readiness and screenshot scope

Wait for the content, not network silence

Playwright supports navigation wait conditions such as load and domcontentloaded. Its Page API discourages networkidle as a generic readiness condition: modern pages may keep connections open, and a quiet network does not necessarily mean the content you need is ready. Wait for a page-specific visible element or another meaningful condition instead. See the Playwright Page API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Lavsoul 4K Webcam with Microphone for PC & Streaming Computer Camera
  • ULTRA HD 4K CLARITY: Stand out in every video call with breathtaking 4K video at 30fps or smooth 1080p at 60fps. Powered by a premium 1/2.5" CMOS sensor and a wide f/1.78 aperture, this webcam captures every detail with vibrant color and stunning low-light performance-so you always look your best
  • FAST AUTOFOCUS & SMART LIGHT CORRECTION: No more blurry moments with this webcam for PC. Advanced Phase Detection Auto Focus (PDAF) locks onto your face instantly and keeps you sharp-even when you move. Built-in light correction adapts to your environment, balancing brightness and contrast for a flawless image in dim rooms or bright spaces
  • DUAL NOISE-CANCELING MICS: Speak with confidence using this webcam with microphones. Dual microphones with intelligent noise-canceling tech isolate your voice and reduce background noise-suitable for webinars, live streams, team meetings, and virtual interviews
  • WIDE-ANGLE LENS & FLEXIBLE MOUNTING OPTIONS: Capture more of your world with an 80 field of view and full 360 swivel rotation. Whether this streaming webcam is mounted on a laptop, monitor, or tripod, it allows you to find the right angle for any setup
  • BUILT-IN PRIVACY COVER & PLUG-AND-PLAY SIMPLICITY: Protect your privacy with a secure sliding lens cover that blocks the camera when not in use. Setup is a breeze-just plug into any USB-A port and start streaming, chatting, or recording instantly. The USB webcam is compatible with Zoom, Microsoft Teams, Skype, OBS Studio, and all major platforms across Windows, macOS, and Linux

For pages that load content as you scroll, a full-page screenshot may not include assets that have not yet been loaded. If those assets matter, scroll or otherwise trigger the relevant lazy-loaded content and check the result before saving.

Pick the capture scope deliberately

Capture Use it for Trade-off
Viewport A consistent initial-screen comparison or a fixed visible region. Content outside the viewport is omitted.
Full page A record of the page’s full scrollable document. Images can be very tall; lazy-loaded content may need additional handling.
Element A chart, panel, or specific content block. Requires a reliable locator for that element.

Playwright documents screenshot paths and options, including full-page capture and device-scale output. CSS scale gives one output pixel per CSS pixel; device scale uses device-pixel density and can produce larger files. The Playwright screenshot guide also describes viewport, full-page, and element captures.

Organize output and handle batch failures

Use stable names derived from a sanitized hostname and path, or a stable index paired with the URL in a manifest. Add a run date or identifier if each run must be preserved rather than overwritten. For each URL, record the final URL if redirects matter, the navigation response status when available, whether the consent control was found and verified closed, and whether the screenshot was written.

A navigation response with an HTTP error status does not necessarily throw an exception. Inspect the returned response status and decide whether a 404 or 500 page should be captured or marked as a failed target. A timeout or navigation exception should be logged separately from a valid HTTP response.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
10.1 Inch Mini Netbook, Quad-Core Processor Laptop Computer, 2GB Memory 64GB Storage Android 12 Portable Notebook Built-in Webcam, WiFi & Bluetooth Keyboard & Mouse for Home Schooling & Office Work
  • 【Efficient Quad-Core Performance】 Powered by a 1.8GHz Quad-Core processor, this mini laptop ensures smooth multitasking. With 2GB RAM and 64GB ROM (expandable to 1TB), it handles daily work and online tasks with ease.
  • 【10.1" HD IPS Display & GMS Support】 Featuring a 1280x800 HD IPS screen, this cheap laptop delivers vibrant visuals. Pre-installed with Android OS and GMS, you get direct access to the Google Play Store for apps.
  • 【Ultra-Portable & Lightweight Design】 Weighing only 1.76 lbs, this Blue computer is designed for mobility. Its compact form makes it an ideal companion for students and professionals for home schooling or trips.
  • 【Versatile Connectivity Options】 Stay productive with dual USB 2.0 ports, a headphone jack, and a TF card slot. This computer for kids and adults features built-in Wi-Fi and Bluetooth for stable connections.
  • 【Complete All-in-One Bundle】 This kid laptop kit includes the laptop, carrying bag, mouse, mouse pad, and power adapter. It is the perfect ready-to-use set for online classes, remote work, and entertainment.

Concurrency and reliability

Start with sequential captures, then introduce bounded concurrency only after checking failure rates and the target sites’ behavior. One Delft University of Technology thesis describes a collector with a default batch size of 15; that is one implementation setting, not evidence that 15 parallel pages is safe or optimal for other sites. Respect site terms and access controls, and reduce concurrency if requests are being throttled or pages become less reliable.

Reuse consent state only when it is appropriate

If a site stores a choice in cookies or local storage, a saved Playwright storage state may allow a later run to start with that state. That does not guarantee a particular consent manager uses those stores, or that a choice carries across domains. Confirm the behavior on each target rather than assuming dismissal persists.

Playwright’s authentication-state guidance explains reusable browser state, including cookies and local storage, and notes that session storage behaves differently and is not persisted across page loads. Treat saved state files as sensitive: they may contain cookies or headers usable to impersonate an account. Keep them out of version control and limit access.

Troubleshoot common problems

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can return an image or PDF from one GET request. Its capture flow accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and billing status in headers. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

Install requests with python -m pip install requests, set YOUR_API_KEY, and run this for each URL in your batch. See the ScreenshotNeo API documentation for request options.

Rank #4
Webcam Cover for Logitech C920 C930e c922x Lens Privacy Shutter Slider
  • Compatible with Logitech C920x HD Pro Webcam, Full HD 1080p/30fps Video Calling. Compatible with Logitech C920 Hd Pro Webcam. Compatible with Logitech HD Pro Webcam C920 Widescreen Video Calling and Recording Webcam.
  • Compatible with Logitech C930e Webcam. Compatible with Logitech C922 Pro Stream Webcam 1080P Camera for HD Video Streaming. Compatible with Logitech Privacy Cover for C920 and C930e.
  • This webcam cover conveniently blocks your camera cover to protect your privacy.
  • This also compatible with other popular webcams. This is also known as webcam lid, webcam cap, webcam protector, web camera privacy cover.
  • ienza is a registered trademark and a registered Amazon brand. Use of the ienza trademark without the prior written consent of ienza, LLC. may constitute trademark infringement and unfair competition in violation of federal and state laws. ienza products are developed as cost-effective alternatives to OEM parts. They are not necessarily endorsed by the OEMs
import requests

urls = ['https://example.com', 'https://www.example.org']
for index, url in enumerate(urls, start=1):
    r = requests.get(
        "https://api.screenshotneo.com/v1/shot",
        params={"access_key": "YOUR_API_KEY", "url": url},
        timeout=90,
    )
    r.raise_for_status()
    with open(f"shot-{index:03}.webp", "wb") as f:
        f.write(r.content)

ScreenshotNeo includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. Try ScreenshotNeo free.

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.

Frequently Asked Questions

Can one cookie-banner selector work across all sites?

No. Banner markup and control wording vary, so use a site-appropriate locator and verify the overlay has closed.

Does dismissing a banner always save consent for the next run?

No. Persistence depends on the target site’s implementation; verify its behavior rather than assuming a saved browser state covers it.

Should I use `networkidle` before taking every screenshot?

No. Use a meaningful page-specific readiness check; Playwright discourages `networkidle` as a generic test-readiness condition.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.