DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober 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
Redmond desk6 min

How to Screenshot Multiple Website URLs with Python on Windows in India

A practical Windows guide to installing Playwright, capturing multiple website URLs in Python, choosing full-page or viewport screenshots, and fixing common setup issues.

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.

Use Playwright for Python to open each URL in a list and save its screenshot under a unique filename. Install the Python package and its browser binaries, choose whether you need the visible viewport or the entire scrollable page, then run a short loop. The procedure below is the same on Windows in India; the cited Playwright documentation describes Windows support but does not identify a special India-specific installation step.

Install Playwright for Python on Windows

Run these commands in PowerShell, using the Python environment you intend to use for the script. Playwright is installed as a Python package, and its browser binaries are installed separately. The official Playwright Python getting-started guide documents both steps.

As an Amazon Associate I earn from qualifying purchases.

  1. Open PowerShell and, if you want dependencies isolated to this project, create and activate a virtual environment:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    py -m venv .venv
    ..venvScriptsActivate.ps1

    Virtual environments help keep the package associated with the project. If PowerShell blocks activation under your current policy, use the Python interpreter from the environment directly rather than changing system policy just for this script.

    #1 Best Overall
  2. Install Playwright:

    py -m pip install playwright
  3. Install the browser binaries:

    py -m playwright install

    The documented browser-install command is playwright install. Using py -m playwright runs the module through the selected Python interpreter, which can help when the standalone command is not on PATH. If you use a different Python launcher or interpreter, use that same one for package installation, browser installation, and running the script.

Save screenshots for a list of URLs

Save the following as batch_screenshots.py. It uses Playwright’s synchronous Python API, creates a screenshots folder if needed, and names each output by its position in the list so one capture does not overwrite another.

from pathlib import Path
from playwright.sync_api import sync_playwright

urls = [
    "https://example.com/",
    "https://www.python.org/",
]

output_dir = Path("screenshots")
output_dir.mkdir(exist_ok=True)

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()

    for index, url in enumerate(urls, start=1):
        page.goto(url)
        page.screenshot(
            path=str(output_dir / f"page_{index}.png"),
            full_page=True,
        )

    browser.close()

Replace the example addresses with the URLs you want to capture. Run the file from PowerShell in the project directory:

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.
py batch_screenshots.py

With full_page=True, the PNG captures the full scrollable page. The files will be saved as screenshotspage_1.png, screenshotspage_2.png, and so on. This loop reuses one browser page and captures URLs sequentially; it does not guarantee that every site will load successfully or show the same content to an automated browser as it does to a visitor.

Choose viewport, full-page, or element capture

The screenshot scope determines what is saved. Playwright’s screenshot guide documents viewport, full-page, and element captures.

For a large page, a full-page image can be much taller than a viewport capture. If you need a particular section rather than the entire document, capture that element instead.

Pick a browser engine and Python API

Playwright for Python supports Windows and the Chromium, Firefox, and WebKit browser engines, according to its getting-started guide and system requirements. The example launches Chromium with p.chromium.launch(). If you need another supported engine, install its browser binary and use p.firefox.launch() or p.webkit.launch(); the URL loop and screenshot call can otherwise stay the same.

The example uses the synchronous API because it is straightforward for a small sequential script. Playwright also documents an asynchronous API. Use async when integrating the capture work into an application that already uses asyncio; it changes the API structure, not the choice between viewport and full-page capture.

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

A Playwright page represents a browser tab or popup, and a browser context can contain multiple pages. For a simple batch, reusing one page sequentially avoids adding concurrency and resource-management complexity. The Pages guide explains pages and contexts.

Rank #3
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Handle readiness and incomplete captures

page.goto(url) navigates to the address before the screenshot call. Some sites continue changing after navigation, so a capture may happen before a particular widget, image, or application state is ready. Avoid treating a fixed sleep as a universal readiness solution; if a site needs more time, wait for a meaningful site-specific condition, such as a selector that appears when the content is ready. No single wait condition can guarantee correct readiness for every website.

Lazy-loaded images may not appear in a capture unless the page loads them as it scrolls or the site otherwise brings them into view. Authentication requirements, consent banners, network failures, and anti-automation checks can also affect the result. Inspect the saved images when completeness matters, and handle failures for individual URLs if the batch should continue after a problem rather than stop at the first exception.

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

Troubleshoot common setup and capture problems

  • No module named 'playwright': the script is running with a different Python interpreter from the one where you installed the package. Activate the intended virtual environment, or install and run Playwright through the same interpreter.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • playwright command is not recognized: the command may not be on PATH. Run the installation through the interpreter instead, for example py -m playwright install, and check that you are using the same Python environment as the script.

  • Browser executable is missing: installing the Python package does not by itself install the browser binaries. Run py -m playwright install in the environment used by the script.

  • The screenshot shows only the visible part of the page: set full_page=True in page.screenshot(). Without it, the screenshot is of the current viewport.

  • Every run overwrites an earlier image: use a distinct path for each URL. The example’s numbered filenames are generated by the loop; Playwright does not choose unique names automatically.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #4
    15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
    • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
    • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
    • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
    • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
    • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
  • A page is blank, incomplete, or blocked: check that the URL is reachable from the machine, whether the site requires a login, and whether its content appears only after a site-specific readiness condition. Bot checks and other site protections may prevent an automated capture.

Or skip the browser setup

If you only need an image from a URL and do not need to manage Playwright locally, ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns an image or PDF. The example below saves a WebP screenshot of a page:

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

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000 shots.

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

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

Frequently Asked Questions

Can I use the same script for websites in India and elsewhere?

Yes. The documented workflow is local Python and Playwright setup on Windows; the cited documentation does not specify a separate India-specific installation process.

Can the script save a particular page section instead of the whole page?

Yes. Use a locator for the element and call its screenshot method, such as page.locator("main").screenshot(path="main.png").

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$245.99
Bestseller No. 2
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$285.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.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.