Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › browser automation

How to Capture Screenshots of Multiple Indian Travel Booking Pages in Bulk

By Freedom251 Team · · 6 min read

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

Use a browser automation script to visit each booking-page URL and save a screenshot with a unique filename. Playwright can capture either the visible browser viewport or the full scrollable page; keep the browser size and capture settings consistent when you need comparable images. Check each travel site’s current terms and access rules before automating it: the instructions below do not establish that any particular Indian booking site permits automated access.

Choose what each screenshot should show

Viewport capture for like-for-like comparisons

A viewport screenshot records only the area visible in the browser window. Use this when you want each page framed at the same width and height—for example, to compare the top section of several booking pages. A consistent viewport improves framing, but it does not make the page content identical: results can change with location, dates, login state, selected itinerary, or other page state.

As an Amazon Associate I earn from qualifying purchases.

Full-page capture for a page record

A full-page screenshot captures the scrollable page rather than only the current viewport. It is useful when you need content farther down the page, though a long image can be harder to compare side by side. Playwright documents viewport, element, and full-page screenshot options in its screenshot guide and Page API.

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

Prepare the URL list and output folder

  1. Make a text file named urls.txt with one complete booking-page URL per line. Use the exact pages and itineraries you are permitted to access.
  2. Decide whether to capture the viewport or full page, and choose a viewport size. A fixed viewport helps standardize framing.
  3. Choose a filename pattern that identifies each page and the capture date. The example below uses a sequential number plus the URL’s hostname, which avoids overwriting captures when the same host appears more than once.
  4. Review the terms and access rules for each specific travel booking site before running automation. The cited Playwright documentation explains screenshot mechanics; it does not establish any named booking site’s automation policy.

Capture the pages with Playwright

The following Node.js script reads urls.txt, visits each URL in order, waits for the page load event, and writes one PNG per URL to a screenshots folder. Set FULL_PAGE to true for scrollable-page captures or false for consistent viewport captures.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner | For Computers including PC and Mac Receipt and Document Scanner USB Powered
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0
  1. Install Node.js, then in a new project folder run npm init -y.
  2. Install Playwright and its Chromium browser with npm install playwright and npx playwright install chromium.
  3. Create urls.txt, one URL per line, and save the script below as capture.mjs.
  4. Run node capture.mjs. The script creates the output folder if needed and reports each saved file.
import { chromium } from 'playwright';
import { mkdir, readFile } from 'node:fs/promises';

const FULL_PAGE = false;
const WIDTH = 1440;
const HEIGHT = 1000;
const urls = (await readFile('urls.txt', 'utf8'))
  .split(/r?n/)
  .map(line => line.trim())
  .filter(line => line && !line.startsWith('#'));

if (urls.length === 0) {
  throw new Error('urls.txt has no URLs');
}

await mkdir('screenshots', { recursive: true });
const browser = await chromium.launch({ headless: true });

try {
  const page = await browser.newPage({ viewport: { width: WIDTH, height: HEIGHT } });

  for (const [index, url] of urls.entries()) {
    let parsed;
    try {
      parsed = new URL(url);
      if (!['http:', 'https:'].includes(parsed.protocol)) {
        throw new Error('Only http and https URLs are supported');
      }
    } catch (error) {
      console.error(`Skipping line ${index + 1}: invalid URL (${error.message})`);
      continue;
    }

    const host = parsed.hostname.replace(/[^a-z0-9.-]/gi, '_');
    const number = String(index + 1).padStart(3, '0');
    const filename = `screenshots/${number}-${host}.png`;

    try {
      const response = await page.goto(url, {
        waitUntil: 'load',
        timeout: 60000
      });
      if (!response) {
        console.warn(`${url}: no main-document response was reported`);
      } else if (!response.ok()) {
        console.warn(`${url}: main-document HTTP status ${response.status()}`);
      }

      await page.screenshot({ path: filename, fullPage: FULL_PAGE });
      console.log(`Saved ${filename} (${url})`);
    } catch (error) {
      console.error(`Failed ${url}: ${error.message}`);
    }
  }
} finally {
  await browser.close();
}

The sequence number preserves a distinct output filename even if several URLs share a hostname. The script uses a single page and processes URLs sequentially, which is a straightforward starting point for a modest batch. It does not log in, choose travel dates, accept consent, bypass bot checks, or prove that a page is complete; those actions depend on each site and its rules.

Adjust waits and capture scope

Wait for the content you need

waitUntil: 'load' waits for the page’s load event, but modern pages can continue rendering or fetching content afterward. If a known result area must appear, wait for a selector before capturing, using Playwright’s page.locator('CSS_SELECTOR').waitFor(). If the page’s layout is stable but content appears after a short delay, a bounded delay can help; neither approach guarantees that all travel data has loaded. Avoid waiting indefinitely for network idle on pages that maintain ongoing connections.

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

Capture a specific element

For a booking summary or search-results panel, use a locator screenshot instead of the full page: await page.locator('CSS_SELECTOR').screenshot({ path: filename }). Replace CSS_SELECTOR with a selector that exists on the exact page. The selector approach is fragile if a site’s markup changes, so confirm the resulting files rather than assuming every URL has the same element.

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

Keep the batch manageable

Run captures one at a time first. If you later add concurrency, use a small limit: each browser page consumes resources, and simultaneous visits can increase load on the target sites or trigger access controls. Do not treat parallelization as a way to evade a site’s restrictions.

Rank #3
Sale
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
  • STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
  • CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
  • HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
  • FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
  • BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer

Verify the output and preserve capture context

  • Open a sample from the beginning, middle, and end of the batch; confirm images exist, open correctly, and show the intended region.
  • Look for consent banners, newsletter popups, chat widgets, incomplete content, or an unexpected error page. The script intentionally does not interact with these elements.
  • Record the URLs and capture date alongside the images if the screenshots will support a comparison or audit. A screenshot represents only the state rendered at capture time.
  • For reproducible comparisons, keep viewport dimensions, full-page setting, browser setup, and page inputs consistent. Site content can still vary by location, date, login state, and selected itinerary.

Troubleshooting

No screenshots are created

Confirm that urls.txt is in the same folder from which you run node capture.mjs, contains non-empty HTTP or HTTPS URLs, and that Playwright and Chromium installed successfully. The script prints an error for invalid URLs or failed navigations.

The page times out or looks incomplete

Some sites take longer than the 60-second navigation timeout or continue loading content after the load event. Check whether the page is accessible in a normal browser, increase the timeout only when justified, and wait for a specific content selector if one is available. If the site presents an access check or blocks automation, stop rather than trying to bypass it.

Rank #4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
  • IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
  • IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
  • IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
  • Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management

The image has the wrong extent

If only the visible area appears, set FULL_PAGE to true. If the full-page image is too long or the comparison needs matching frames, set it to false and retain a fixed viewport.

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.

A file is missing or reports an HTTP error

The script continues after per-URL failures and prints the affected URL. Check that URL directly, confirm it has not expired or redirected to an unavailable page, and rerun only after verifying the site permits the access. A non-success HTTP status is reported as a warning; it does not by itself guarantee that the screenshot is useful.

Best Value
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images
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 provides a one-request screenshot API. Its capture options can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before the screenshot; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status. Its MCP server includes tools for AI agents to take screenshots, get page information, and capture PDFs.

For one URL, use this cURL call; replace the target URL and API key. See the ScreenshotNeo API documentation for the request options and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://makemytrip.com -o shot.webp

To capture multiple pages, run one request per URL and give each output a unique filename, just as in the Playwright loop. ScreenshotNeo includes 1,000 shots per month free with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.

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

Frequently Asked Questions

Does a full-page screenshot include pages that require scrolling to load more results?

It captures the page content rendered for the full-page capture, but it does not guarantee that every site has loaded additional results that appear only after scrolling or interaction.

Can I use this workflow for pages that require an account?

The example does not log in. Use only access methods allowed by the specific site’s terms, and do not put account credentials into a batch script unless you have a legitimate need and can protect them.

Quick Recap

SaleBestseller No. 3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer; This product is not intended for scanning photographs on photo paper / photographic media
$153.00
Bestseller No. 4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
Find our Software here : irislink.com/start; IRIScan Express is only compatible Windows platform and not macintosh
$129.00
Bestseller No. 5
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Scanner type: Document; Connectivity technology: USB; With Auto Scan Mode, the scanner automatically detects what you're scanning
$75.00

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.

browser automationPlaywrightScreenshotNeotravel bookingweb screenshots

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.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.