Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →To capture many websites with Selenium, loop through a list of URLs, open each in one WebDriver session, and save the current browser window to a uniquely named PNG. Check the return value of save_screenshot() for every file, then close the browser with quit(). The example below uses Selenium’s documented Python API method, which captures the current window rather than promising a full-page image.
What this script does—and what it captures
Selenium’s Python save_screenshot(filename) method writes a PNG of the current browser window and returns True when the save succeeds or False if an I/O error occurs. Selenium recommends providing a full path and a .png extension. See the Selenium Python WebDriver API.
This is a window screenshot, not a universal full-page capture. It shows the portion rendered in the browser window at the time of capture. If you need full-page images, verify a browser-specific technique against that browser’s current documentation instead of assuming this method captures beyond the viewport.
Install Selenium and prepare the URL list
Install Selenium in the Python environment that will run the script:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
python -m pip install selenium
Put the pages to capture in a Python list. The sample below uses Selenium’s Chrome WebDriver. Selenium’s documented example follows the same basic sequence: create a driver, navigate, save, and quit. Browser and driver setup may vary by machine; consult Selenium’s current WebDriver documentation if the browser does not start.
Run a bulk screenshot script
Save this as bulk_screenshots.py. It creates the output directory, gives each URL a numbered PNG filename to prevent collisions, fixes the browser window size for more consistent comparisons, reports failed saves, and quits the browser even if a capture raises an exception.
Rank #2
from pathlib import Path
from selenium import webdriver
URLS = [
"https://example.com/",
"https://www.python.org/",
"https://www.selenium.dev/",
]
OUTPUT_DIR = Path("screenshots")
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options)
try:
# Use the same viewport for each page when comparing screenshots.
driver.set_window_size(1440, 1000)
for index, url in enumerate(URLS, start=1):
filename = OUTPUT_DIR / f"{index:03d}.png"
print(f"Capturing {url} -> {filename}")
try:
driver.get(url)
saved = driver.save_screenshot(str(filename))
if saved:
print(f"Saved {filename}")
else:
print(f"Save failed for {url}: Selenium reported an I/O error")
except Exception as exc:
print(f"Capture failed for {url}: {exc}")
finally:
driver.quit()
Run it from a terminal with:
python bulk_screenshots.py
Successful captures appear in the screenshots directory as 001.png, 002.png, and so on, in the order of the URL list. The numbering is deliberately stable and unique within this run; rerunning the script overwrites files with the same numbers.
Make the batch useful and predictable
Keep viewport dimensions fixed for comparisons
Screen resolution can affect how a page renders. Set a consistent window size before the loop when visual comparisons matter; Selenium documents window sizing in its windows and tabs guide. The screenshot remains a capture of the current browser window, so choose dimensions that show the area you need.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Handle filenames and reruns deliberately
Sequence-based names avoid unsafe characters and duplicate URL-derived names. If you need filenames tied to pages, generate a sanitized slug and still include a sequence number or other uniqueness component. Decide whether a new run should overwrite prior output or write into a timestamped folder.
Choose a loading policy that matches the pages
The sample navigates to each URL and captures after driver.get() returns. Pages that render important content later may need a wait condition before saving; a fixed delay is simple but can be wasteful or insufficient across sites. The right condition depends on the page. Selenium’s documentation does not establish a universal delay or batch size for reliable captures.
Know what affects run time
There is no documented throughput figure to rely on here. Total elapsed time depends on the sites, their load behavior, browser configuration, and the machine running the batch. One browser session is straightforward to manage; adding concurrent sessions introduces more browser and resource management and should be tested against the target workload rather than assumed to be faster or more reliable.
Troubleshooting common failures
- Chrome does not start: Check that Chrome is installed and that the environment can launch it. Review Selenium’s current WebDriver setup guidance for browser and driver compatibility.
- A PNG is missing or the save reports
False: Confirm the output directory exists and the process can write to it. The script creates the directory, but filesystem permissions can still prevent saving. - Two pages overwrite one image: Use unique output filenames. The numbered scheme above assigns a distinct name to every list entry.
- The capture shows only part of the page:
save_screenshot()captures the current window. Increase the window dimensions if that helps, or use a browser-specific full-page approach verified for the browser you run. - The screenshot shows incomplete content: The page may still be rendering after navigation. Add a wait appropriate to the content that must appear before capture.
- One URL fails and stops the batch: Keep per-URL exception handling inside the loop, as in the sample, so later URLs can still be attempted. Inspect the printed error and decide whether to retry or record that URL for a later run.
- The process leaves browser processes open: Ensure
driver.quit()runs in afinallyblock so the WebDriver session is closed after success or an error.
Or skip the browser setup
ScreenshotNeo offers a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; its cleanup options can accept consent banners and remove known consent platforms, newsletter popups, and chat widgets before capture. The service says bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with page verdict and billing headers in responses. An MCP server exposes screenshot tools to AI agents, and the free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000.
For example, this cURL request saves a WebP screenshot of one URL; repeat it for each address in your batch or use the API’s bulk capture option for up to 100 URLs per call. See the ScreenshotNeo API documentation for request options.
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Sign up for 1,000 free screenshots a month with no card.
Frequently asked questions
Can I save screenshots as JPEG instead of PNG with Selenium?
The documented save_screenshot() method saves PNG files. Converting the saved image to another format is a separate step.
Does Selenium WebDriver support only one browser protocol?
Selenium describes WebDriver as a W3C Recommendation and WebDriver BiDi as a bidirectional automation protocol developed with browser vendors. Details are in its WebDriver overview.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchQuick Recap
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.




