Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Use a real browser to load the page, wait for the condition that means its head is ready, read meta[property] elements from the rendered DOM, and save a screenshot as a separate artifact. Open Graph values are not contained in the pixels of a screenshot: they are document metadata carried in each element’s content attribute. The script below preserves repeated properties and their order, records the final URL, and can capture a viewport, full page, or selected element.
What you will build
The workflow has four independent outputs:
- An ordered map such as
{"og:title":["Example"],"og:image":["/hero.jpg","/alternate.jpg"]}. - The final URL after redirects.
- Optional conventional metadata such as
descriptionandtwitter:card. - A PNG, JPEG, or WebP screenshot produced by Playwright.
Open Graph defines core properties including og:title, og:type, og:image, and og:url, plus commonly used fields such as og:description, og:site_name, and og:locale. Image groups may also contain og:image:secure_url, og:image:type, og:image:width, og:image:height, and og:image:alt (Open Graph protocol).
Prerequisites and installation
- Install a current Node.js release.
- Create a project and install Playwright:
mkdir og-renderer cd og-renderer npm init -y npm install playwright npx playwright install chromium - Save the script below as
extract-og.mjs.
Complete Playwright script
Run it with node extract-og.mjs https://example.com. The default readiness check waits for domcontentloaded and then for an og:title element. Change the selector for pages whose application inserts metadata only after another state is reached.
import { chromium } from 'playwright';
import fs from 'node:fs/promises';
const target = process.argv[2];
if (!target) throw new Error('Usage: node extract-og.mjs https://example.com');
const browser = await chromium.launch();
const page = await browser.newPage({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1
});
const result = {
requestedUrl: target,
finalUrl: null,
documentTitle: null,
extractedAt: new Date().toISOString(),
openGraph: {},
meta: {},
navigationError: null
};
try {
await page.goto(target, { waitUntil: 'domcontentloaded', timeout: 45000 });
// Prefer a page-specific readiness condition when one is known.
await page.locator('meta[property="og:title"]').first()
.waitFor({ state: 'attached', timeout: 10000 }).catch(() => {});
result.finalUrl = page.url();
result.documentTitle = await page.title();
result.openGraph = await page.locator('meta[property^="og:"]').evaluateAll(nodes => {
const out = {};
for (const node of nodes) {
const property = node.getAttribute('property');
const content = node.getAttribute('content');
if (!property || content === null) continue;
(out[property] ??= []).push(content);
}
return out;
});
result.meta = await page.locator('meta[name]').evaluateAll(nodes => {
const out = {};
for (const node of nodes) {
const name = node.getAttribute('name');
const content = node.getAttribute('content');
if (!name || content === null) continue;
(out[name] ??= []).push(content);
}
return out;
});
await page.screenshot({ path: 'page.webp', fullPage: true, type: 'webp' });
} catch (error) {
result.navigationError = String(error);
} finally {
await fs.writeFile('metadata.json', JSON.stringify(result, null, 2));
await browser.close();
}
console.log(JSON.stringify(result, null, 2));
The output file metadata.json keeps arrays even when a property occurs once. That prevents a later consumer from silently losing alternate images or structured properties. The screenshot is written to page.webp; metadata extraction still succeeds if screenshot encoding fails, because the error is recorded separately.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
How do I get og:title and og:image after a page loads?
Use the property attribute, not name. A minimal extraction after navigation is:
const values = await page.locator('meta[property="og:title"], meta[property="og:image"]')
.evaluateAll(nodes => nodes.map(n => ({
property: n.getAttribute('property'),
content: n.getAttribute('content')
})));
console.log(values);
For one value, select the first array item. For reliable integrations, keep every match. The protocol says repeated properties represent multiple values and gives the first top-to-bottom value preference when values conflict. Image structured properties belong to the image root immediately before them; a new og:image starts a new group (protocol details).
Choose the right readiness condition
Playwright navigation supports commit, domcontentloaded, load, and networkidle (Page API). They describe browser events, not whether an application has finished constructing its metadata.
Static HTML
domcontentloaded is usually enough when the server sends the head in the initial response.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated 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 matchClient-rendered head tags
Wait for a meaningful assertion, such as meta[property="og:title"], a route-specific marker, or visible application state. A fixed delay can be a fallback but is slower and still may be too short.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Why not always use networkidle?
The current API documentation discourages networkidle for testing because analytics, sockets, and polling can prevent a stable idle point. Use it only when the target’s behavior makes it appropriate, and still verify the expected element.
Navigation races
Use the navigation call itself or URL assertions rather than the deprecated page.waitForNavigation; Playwright labels that method deprecated and describes it as inherently racy (Page API).
Normalize and interpret the metadata
Values are strings exactly as supplied in content. If an image or URL is relative, resolve it against page.url() as an application-level convenience while retaining the original string for diagnostics:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
function absoluteUrl(value, base) {
try { return new URL(value, base).href; }
catch { return value; }
}
const original = result.openGraph['og:image'] ?? [];
const resolved = original.map(value => absoluteUrl(value, result.finalUrl));
URL resolution is not an Open Graph protocol rule; document your chosen base and preserve both forms. Do not assume that every site supplies all core properties, or that social platforms consume malformed or conflicting tags identically.
Capture the screenshot separately
Playwright can save bytes to a file or return them in memory (screenshot documentation).
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Viewport image
await page.screenshot({ path: 'viewport.png', fullPage: false });
Full scrollable page
await page.screenshot({ path: 'full-page.png', fullPage: true });
One element
await page.locator('main').screenshot({ path: 'main.png' });
In-memory processing
const bytes = await page.screenshot({ type: 'png' });
// Upload bytes, hash them, or pass them to an image processor.
Record the browser engine, viewport, device scale factor, color scheme, locale, timezone, and target URL when screenshots must be compared later. Pixel identity across machines is not guaranteed unless you measure and control those variables.
Useful rendering controls
- Set
colorScheme: 'dark'in the browser context to test dark-mode output. - Use a device descriptor or explicit viewport and
deviceScaleFactorfor mobile or retina captures. - Use
page.addStyleTagor injected CSS to hide animations and caret blinking before capture. - Use
page.routeto block known ads or trackers when that is part of your test, but document the altered network conditions. - For authenticated pages, create a context with stored state or add cookies and headers before navigation. Treat exported metadata and screenshots as potentially sensitive.
Troubleshooting
No Open Graph values are returned
Inspect await page.content() and confirm the page is not a login, bot-check, or error response. If the application adds tags later, wait for its actual readiness marker. Some pages simply do not publish Open Graph metadata.
The title is present but stale
You likely extracted before a client-side route completed. Wait for the route-specific heading or meta element, then read the head again. Avoid treating a successful HTTP response as proof that rendering is complete.
Images are missing or duplicated
Keep ordered arrays and associate og:image:* fields with the preceding image root. Do not collapse the map to a single value unless your consumer explicitly wants the first one.
Screenshot is blank or cut off
Check that the page was not closed, wait for fonts or a key image, and choose fullPage versus viewport intentionally. Lazy-loaded content may require scrolling or an application-specific wait before capture.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Timeouts and blocked navigation
Increase the timeout only after identifying the cause. Check DNS, TLS, redirects, authentication, robots or bot challenges, and resource failures. Save the error alongside partial metadata so retries are diagnosable.
Performance, reliability, and cost decisions
- Reuse a browser process for batches, but create isolated contexts for cookies, viewport, and credentials.
- Limit concurrency to what the target and your machine can sustain; excessive parallel pages increase memory use and trigger rate limits.
- Cache metadata by canonical URL when freshness permits, and include the final URL and extraction timestamp in the cache record.
- Retry transient DNS, connection, or 5xx failures with bounded exponential backoff. Do not blindly retry deterministic 404s or authentication failures.
- Keep screenshots and metadata on separate retention policies: images are larger, while metadata can contain page text or private URLs.
Or skip the browser setup
ScreenshotNeo is a screenshot API and MCP server. It can accept consent banners before capture and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. It does not replace DOM metadata extraction, so keep the Playwright path when you need og: values; use this call when you need a clean visual artifact.
See the ScreenshotNeo API documentation for all options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
It also provides an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
FAQ
Can a screenshot reveal Open Graph tags?
No. Pixels show rendered content; Open Graph is structured metadata in the document head. Read the DOM or response HTML separately.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Should I parse the initial HTTP response instead?
Parse initial HTML when server-rendered tags are sufficient. Use a browser when scripts can insert or change the head, or when you need a matching visual capture.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
What if a page has several og:image tags?
Preserve their order and their associated structured fields. Consumers can then apply the protocol’s first-value preference or choose an alternative deliberately.
Which screenshot scope should I choose?
Viewport matches what a user initially sees, full page captures the scrollable document, and a locator screenshot isolates one component. Select based on the artifact’s purpose.
Frequently Asked Questions
Can I extract metadata without launching Chromium?
Yes, for server-rendered pages you can parse the HTTP response HTML. A rendered browser is necessary when scripts modify the head or when you need the screenshot from the same post-load state.
Free tools Windows power users keep installed
One-click scans. No signup required.
Does Playwright guarantee identical screenshots on every operating system?
No. Browser version, fonts, viewport, device scale factor, and system rendering can change pixels; control and record those variables for comparisons.
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.

