Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows 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 reinstalliTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Use Playwright to loop through your URLs, save a uniquely named screenshot for each page, then upload the files to Google Drive. For a repeatable API workflow, use Google Drive’s resumable upload method when files are larger than 5 MB or a connection may be interrupted; Drive API batch requests do not combine image-media uploads.
What you need
- A list of page URLs, one per record.
- Node.js and Playwright for the browser-based capture loop below.
- A Google Drive destination. The example captures files locally; upload them manually through Drive or add a Drive API upload step.
Playwright provides screenshot operations, but it does not supply a single built-in function that accepts an arbitrary URL batch and completes the full capture-and-upload job. The loop, filenames, readiness checks, and error handling are yours to define.
Capture one screenshot per URL with Playwright
Install Playwright and its Chromium browser in your project:
npm init -y
npm install playwright
npx playwright install chromium
Save this as capture.mjs. It reads URLs from urls.txt, with one URL per line, and writes each image to a screenshots directory:
#1 Best Overall
- 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
import { chromium } from 'playwright';
import { mkdir, readFile } from 'node:fs/promises';
const urls = (await readFile('urls.txt', 'utf8'))
.split(/r?n/)
.map((line) => line.trim())
.filter((line) => line && !line.startsWith('#'));
await mkdir('screenshots', { recursive: true });
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
try {
for (const [index, url] of urls.entries()) {
const filename = `screenshots/${String(index + 1).padStart(4, '0')}.png`;
try {
const response = await page.goto(url, {
waitUntil: 'domcontentloaded',
timeout: 30000
});
if (!response) {
console.warn(`No main-document response: ${url}`);
} else if (!response.ok()) {
console.warn(`HTTP ${response.status()} for ${url}`);
}
await page.screenshot({ path: filename, fullPage: true });
console.log(`Saved ${filename} from ${url}`);
} catch (error) {
console.error(`Failed ${url}: ${error.message}`);
}
}
} finally {
await browser.close();
}
Run it with node capture.mjs. Each URL gets an index-based filename, so repeated or similar URLs cannot overwrite one another. This basic version logs failures and moves on; keep a separate failed-URL list if you need to retry only unsuccessful captures.
Choose when a page is ready
The example waits for domcontentloaded, then captures. That is a starting point, not a universal signal that every page is visually complete: pages may render content later or load images lazily. If a particular site needs more time, wait for a known selector or a measured delay before calling screenshot. Avoid assuming one fixed wait works for every site.
Viewport or full-page capture
fullPage: true captures the full scrollable page and can produce a tall image. Omit it to capture only the visible viewport at the configured dimensions, which records the screen-sized view rather than the entire document. Full-page output is not necessarily suitable for every layout; choose based on what the image must represent.
Rank #2
- 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)
Use screenshot bytes instead of local files
For later processing in memory, Playwright can return a buffer:
const imageBytes = await page.screenshot({ fullPage: true });
The buffer can be passed to another part of your program, but a Drive API upload still needs an individual media-transfer operation for each image.
Upload the screenshots to Google Drive
Manual upload through Drive
Open the target folder in Google Drive, choose the upload option, and select the files in screenshots. This is the simplest route when the batch is small or occasional; it avoids implementing API authorization and upload recovery.
Rank #3
- 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
Automate a browser-based file upload
Playwright can set multiple local paths on an HTML file input in one call. This only works if the specific upload flow exposes a compatible file input and accepts multiple files:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsawait page.locator('input[type="file"]').setInputFiles([
'screenshots/0001.png',
'screenshots/0002.png'
]);
Use the actual file input selector and file paths for the page you are automating. Do not assume that every Drive interface flow exposes a multi-file input in the same way.
Choose a Drive API upload method
Google documents three approaches. The choice depends on file size, whether metadata must accompany the upload, and the risk of an interrupted connection.
Rank #4
- 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
| Method | Use it when | Trade-off |
|---|---|---|
| Simple upload | The file is 5 MB or less and you do not need to send metadata with the media. | Direct small-file upload without metadata. |
| Multipart upload | The file is 5 MB or less and you want metadata and media in one request. | Combines metadata and content in one request. |
| Resumable upload | The file is larger than 5 MB or the connection may fail during transfer. It can also be used for smaller files. | Requires an extra request per upload, but supports resuming after interruption. |
These limits and recommendations are from Google’s Drive upload guidance. For a batch of screenshots, apply the upload choice to each file; a large collection does not turn the media into a single upload.
Recover an interrupted resumable upload
- Initiate a resumable upload and save the session URI returned by Drive.
- Send the file content to that URI using
PUT. - If a transfer is interrupted, query the session status and read the server’s
Rangeresponse to find how many bytes Drive received. - Resume from the next unreceived byte. A
308 Resume Incompleteresponse means the upload is still in progress, not that it failed permanently. - Discard and restart if the session URI has expired. Google says resumable session URIs expire after one week.
Do not infer accepted progress from the last chunk your client attempted to send; use the server-reported status. Google describes resumable upload as a way to resume after a communication failure interrupts the data flow in its upload documentation.
Drive API batching does not batch screenshot media
Drive API batch requests can combine eligible API calls and reduce connection overhead, but they do not support media upload or download. Google documents a limit of 100 calls in one batch request. You may batch eligible metadata operations, but each screenshot’s media still needs its own upload operation. See Google’s Drive API performance guidance.
Best Value
- Scanner type: Document
- Connectivity technology: USB
- With Auto Scan Mode, the scanner automatically detects what you're scanning
- Digitize documents and images
Common problems and fixes
- Several captures have the same filename: Use a unique index or other stable identifier in each output name; a repeated name can overwrite an earlier file.
- A screenshot misses late content: Wait for a page-specific selector or suitable delay before capture. Page readiness varies; there is no universal wait that guarantees every site has finished rendering.
- A page navigation times out: Record the URL and error, then decide whether to retry it. The sample continues to the next URL rather than aborting the whole run.
- Drive returns 308: For a resumable upload, this indicates incomplete content. Query the session and resume based on the returned byte range.
- A resumable session no longer works: Its URI may have expired after one week; initiate a new session.
- A multi-file browser upload fails: Check that the target page actually exposes a file input that accepts multiple files, and use the correct selector and paths.
- You expected one API batch request to upload all images: Drive API batching excludes media transfers. Upload the image content through individual operations.
Or skip the browser setup
ScreenshotNeo can return a screenshot from one GET request, which is useful when you want to avoid managing a browser for the capture stage. For example, this shell loop sends each URL to ScreenshotNeo and saves the response under a distinct filename:
mkdir -p screenshots
while IFS= read -r url; do
[ -z "$url" ] && continue
name=$(printf '%s' "$url" | sed 's/[^A-Za-z0-9._-]/_/g')
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode "url=$url"
-o "screenshots/$name.webp"
done < urls.txt
See the ScreenshotNeo API documentation for request options. It accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. This handles screenshot capture, not uploading the results to your Google Drive folder, so retain an upload step for that part.
Sign up for 1,000 free screenshots a month, with no card required.
Recommended Free Tools
Frequently Asked Questions
Can I capture screenshots without saving them to disk first?
Yes. Playwright’s screenshot method can return image bytes in a buffer; you can pass those bytes to another part of your program.
Can Google Drive resumable uploads be used for small screenshots?
Yes. Google documents resumable uploads as an option for small files too, though it adds one extra request per upload.
Quick 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.

