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 DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

How to Bulk Capture Screenshots of Pages with Geolocation Settings

A practical Playwright workflow for capturing multiple URLs under named geolocation settings, with full-page options, output tracking, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright to set geolocation on a browser context, grant that context permission to access it, and capture each page assigned to those coordinates. Group pages by location: a context’s geolocation applies to all its pages, so use separate contexts when different location groups need to run at the same time.

Prepare URLs and location groups

Make a list of the pages to capture and the location each should see. For every location, record a label plus latitude and longitude. The label can be used in filenames and a capture manifest so each image can be traced to its URL and conditions.

As an Amazon Associate I earn from qualifying purchases.

Playwright emulates browser geolocation through a browser context and requires the geolocation permission for pages to access it. See Playwright’s geolocation emulation documentation.

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

Bulk capture with Playwright

The following Node.js script groups URLs by location, creates a context for each group, grants geolocation access, and saves one PNG per URL. Install Playwright first with npm install playwright; install the browser you intend to use with npx playwright install chromium. Save the script as capture.js and run it with node capture.js.

#1 Best Overall
Geovision GV-EBD4704 4MP H.265 Super Low Lux WDR Pro IR Eyeball Dome IP Camera with 2.8mm Lens, Built-in Microphone
  • [Overview]: GV-EBD4704 is an outdoor, network camera equipped with an automatic IR-cut filter and an IR LED for day and night surveillance. The camera adheres to IP67 standards. The camera supports H.265 video codec to achieve better compression ratio while maintaining high quality pictures at reduced network bandwidths.
  • [Specs]: Sensor:1/3" progressive scan low lux CMOS sensor- Resolution: Up to 30 fps at 2688 x 1520, Lens: 2.8mm lens - Camera Angle Adjustment: Pan 0° ~ 360° Tilt 0° ~ 75°, Built-in microphone, IR distance up to 30 m (100 ft) - 1 IR LED, Day and Night function (with removable IR-cut filter).
  • [Weatherproof]: This camera features heavy-duty metal weatherproof IP67 housing & IK10 Vandal Resistant.
  • [Smart Security]: Wide Dynamic Range Pro (WDR Pro) - Defog - 3D noise reduction - Motion detection. The camera supported by smart motion detection technology, senses humans & vehicles, receive intelligent alerts via the Geovision app anytime motion is detected.
  • [Easy Installation]: This PoE camera uses a single Ethernet cable to transmit both data and power. Simplified wiring means easier and clean installation.
const { chromium } = require('playwright');
const fs = require('node:fs/promises');
const path = require('node:path');

const jobs = [
  {
    location: { label: 'new-york', latitude: 40.7128, longitude: -74.0060 },
    urls: ['https://example.com/', 'https://example.org/'],
  },
  {
    location: { label: 'london', latitude: 51.5072, longitude: -0.1276 },
    urls: ['https://example.net/'],
  },
];

const outputDir = 'screenshots';
const viewport = { width: 1440, height: 900 };

function safeName(value) {
  return value.replace(/[^a-z0-9.-]+/gi, '-').replace(/^-|-$/g, '').slice(0, 100) || 'page';
}

(async () => {
  await fs.mkdir(outputDir, { recursive: true });
  const browser = await chromium.launch();
  const manifest = [];

  try {
    for (const job of jobs) {
      const { label, latitude, longitude } = job.location;
      const context = await browser.newContext({
        viewport,
        geolocation: { latitude, longitude },
        permissions: ['geolocation'],
      });

      try {
        for (let i = 0; i < job.urls.length; i++) {
          const url = job.urls[i];
          const page = await context.newPage();
          const startedAt = new Date().toISOString();
          let screenshotPath;
          let error;

          try {
            const response = await page.goto(url, {
              waitUntil: 'domcontentloaded',
              timeout: 60000,
            });
            // Replace this with a selector that indicates the location-dependent
            // interface is ready on your target site, when one is available.
            await page.waitForTimeout(1000);

            const host = new URL(url).hostname;
            screenshotPath = path.join(
              outputDir,
              `${safeName(label)}-${String(i + 1).padStart(3, '0')}-${safeName(host)}.png`
            );
            await page.screenshot({ path: screenshotPath, fullPage: true });

            manifest.push({
              url,
              location: label,
              latitude,
              longitude,
              capturedAt: new Date().toISOString(),
              viewport,
              screenshotPath,
              httpStatus: response ? response.status() : null,
            });
          } catch (err) {
            error = err.message;
            manifest.push({
              url,
              location: label,
              latitude,
              longitude,
              attemptedAt: startedAt,
              screenshotPath: null,
              error,
            });
            console.error(`Failed: ${url} (${label}): ${error}`);
          } finally {
            await page.close();
          }
        }
      } finally {
        await context.close();
      }
    }
  } finally {
    await browser.close();
    await fs.writeFile(
      path.join(outputDir, 'manifest.json'),
      JSON.stringify(manifest, null, 2)
    );
  }
})().catch(err => {
  console.error(err);
  process.exitCode = 1;
});

Replace the sample URLs and coordinates with your jobs. The capture uses fullPage: true; set it to false to capture only the visible viewport. Playwright’s screenshot API also documents output path, image type, and scale options; check the Page API for the version installed in your project.

Wait for the right content

The example waits for the document’s DOM to load, then uses a short delay as an adjustable fallback. For production batches, prefer waiting for a site-specific selector that appears when location-dependent content is ready. A fixed delay cannot guarantee that an application has fetched and rendered its location-specific data.

Rank #2
Sale
Transcend 128GB DrivePro Body 40 Action Camera, with Night Vision
  • Sony STARVIS 2 Image Sensor: This sensor provides 2K QHD 1440P resolution at 60fps, delivering high-quality images with enhanced low-light performance and a wide dynamic range.
  • Infrared LEDs for Night Vision: Equipped with four infrared LEDs that activate in low-light conditions, the camera ensures clear recording even in complete darkness.
  • Rugged and Durable Design: With an IP68 rating for water and dust resistance and compliance with U.S. military drop-test standards, the DrivePro Body 40 is built to withstand harsh environments.
  • Extended Battery Life: The built-in high-capacity lithium battery allows for up to 11 hours of continuous recording on a single charge, ensuring comprehensive coverage during long shifts. 【Note: Recording time may differ based on environmental conditions and operation settings (eg. enabling infrared during night recording consumes more power, resulting in a shorter recording duration).】
  • Built-in GPS/GLONASS Receiver: This feature tags videos and photos with geolocation data, enabling precise tracking of routes and event locations.

Run different locations safely

Pages in one context share its geolocation. The script therefore completes one location group in a context before moving to the next. If you need to capture location groups concurrently, create a distinct context per location; do not change the location of a context while its pages are being captured under another location assumption.

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.

Choose viewport or full-page output

  • Viewport: use fullPage: false when you need a consistent, screen-sized view.
  • Full page: use fullPage: true to include content below the fold. Very long pages can generate tall, large image files.
  • Scale: Playwright provides screenshot scale options. CSS-pixel output is generally smaller; device-pixel output retains device-resolution detail. Confirm supported options for your installed version.

What geolocation emulation does—and does not—control

Playwright supplies coordinates through the browser’s geolocation interface. It does not establish that a site will use those coordinates for every location decision. A site may instead use IP-derived location, an account preference, cached state, or its own permission and application logic. Verify the target site’s behavior rather than assuming browser emulation changes every location signal.

Rank #3
Sale
Pelsee S1 Pro Native 4K + 4K Dash Cam Front and Rear, 128GB Card Included
  • 【True 4K Front + 4K Rear Recording】Dual-channel native True 4K UHD simultaneous recording with HDR wide dynamic range processing. Equipped with 170°wide angle front & 150° rear lenses to eliminate road blind spots, delivering crisp 3840x2160P @30fps ultra-high-definition footage. 8MP HDR technology balances overexposed headlights, tunnel backlight and shadowed areas, capturing legible license plates & road markers under all ambient light without interpolated upscaling.
  • 【Built-in GPS & Ultra-Fast WiFi 6】Integrated high-precision GPS module embeds real-time speed, geolocation and timestamp metadata onto recorded footage for official accident evidence. Dual-band WiFi 6 supports both 2.4GHz and 5.8GHz connections, delivering blazing-fast transfer speed up to 30MB/s. Access instant live preview, one-tap footage download, playback, share, convenient over-the-air firmware updates anytime.
  • 【Full-Color Night Vision】Equipped with GalaxyCore high-sensitivity CMOS low-light image sensor, F1.5 large aperture lens and hybrid glass lens to deliver premium full-color starlight night vision. Advanced multi-frame noise reduction eliminates grainy distortion in dim underground parking garages and unlit roadways, preserving vivid colors and crisp clear details without washed-out monochrome footage at night.
  • 【Smart AI Voice Control】Hands-free AI voice control supports full voice operation without tapping buttons. Available voice commands include switching front/rear camera view, turning the screen/audio on & off, capturing snapshots, and locking critical footage. You can effortlessly take photos to capture gorgeous roadside scenery during road trips, with clear audio feedback to confirm every voice command.
  • 【24H Vehicle Protection System】All-in-one 24-hour parking surveillancefeatures time-lapse recording and G-sensor collision lock. Its built-in tri-axis gravity sensor detects bumps and hit-and-run impacts while your car is parked. The dash cam locks impact footage to a separate folder to avoid overwriting, and time-lapse mode records continuous condensed footage for full all-day vehicle safety. (Hardwire kit required:B0C7QY4KB9)

Keep the location label, coordinates, URL, capture time, viewport, and output path in a manifest. The example records these details for successful captures and records errors for failed ones, which makes it easier to identify missing images and reproduce a capture.

Troubleshooting

  • The site still shows the wrong region: confirm the page is using browser geolocation rather than IP location or account settings. Check that the context has the intended coordinates and permission, then inspect the site’s location-dependent behavior.
  • Geolocation permission is denied or unavailable: create the context with both geolocation coordinates and permissions: ['geolocation']. Pages must request and handle the browser geolocation API.
  • Different pages appear to share the wrong location: the setting is context-wide. Put each simultaneous location group in its own context and do not mix locations among pages in the same context.
  • The screenshot shows a loading state: replace the generic delay with a wait for a target-specific selector or another reliable readiness condition. Increase navigation timeout only if the page legitimately needs longer to load.
  • Some output files are missing: check the console and manifest.json for navigation or screenshot errors. A failed navigation can prevent the capture step from being reached.
  • Images are unexpectedly huge: use a viewport screenshot instead of full-page capture, or check the screenshot scale and viewport settings against the desired output.
  • Filenames collide or are hard to audit: retain a stable location label and page identifier in the name, and use the manifest to preserve the original URL and capture conditions.
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 a screenshot from one GET request. For a public image URL or a saved file, use the output options in the ScreenshotNeo documentation.

Rank #4
GeoVison GV-EBD8800 8MP WDR PoE IR Eyeball Network Outdoor Dome Camera with 2.8mm Lens RJ45 Connection
  • [Overview]: This Bullet IP Camera is an outdoor, network camera equipped with an automatic IR-cut filter, one IR LED and two warm LEDs for day and night surveillance. The camera supports H.265 video codec to achieve better compression ratio while maintaining high quality pictures at reduced network bandwidths.
  • [Specs]: Sensor: 1/2.7" progressive scan low lux CMOS sensor- Resolution: Up to 20 fps at 3840 x 2160, Lens: 2.8mm lens - Camera Angle Adjustment: Pan 0° ~ 360° Tilt 0° ~ 75°, IR distance up to 30 m (100 ft) - 1 IR LED, Day and Night function (with removable IR-cut filter), 3-axis mechanism (pan / tilt / rotate), built-in micro SD card slot (SD/SDHC/SDXC/UHS-I, Class 10) for local storage.
  • [Weatherproof]: This camera features heavy-duty metal weatherproof IP67 housing & IK10 Vandal Resistant.
  • [Smart Security]: Empowered by deep learning algorithms, AI technology distinguishes human and vehicles from other moving objects. Integrated with GeoVision Video Management Software (VMS), it supports AI perimeter protection, real time alert, events playback and more.
  • [Easy Installation]: This PoE camera uses a single Ethernet cable to transmit both data and power. Simplified wiring means easier and clean installation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts and removes cookie or consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers identifying the page verdict and billing status. Its MCP server lets AI agents use screenshot tools. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

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

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Frequently Asked Questions

Can I change geolocation after creating a Playwright context?

Yes. Playwright allows changing the context geolocation, but the change applies to all pages in that context.

Best Value
Geovision GV-TBL8804 8MP H.265 Super Low Lux WDR Pro Full Color Warm LED IR Bullet IP Camera, AI deep Learning
  • 1/2.7" progressive scan super low lux CMOS
  • Day and Night function (with removable IR-cut filter)
  • Built-in micro SD card slot (SD / SDHC / SDXC / UHS-I, Class 10) for local storage
  • AI deep learning: AI Perimeter Protection & Classification (Human, Vehicle)
  • IP67. Two-way audio. Alarm sound and warm LED light triggered on AI detection events

Does browser geolocation guarantee a site will show the selected country or city?

No. A site can use IP location, account settings, cached state, or other application logic instead of the browser’s geolocation coordinates.

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.