Build a useful competitor price monitor by tracking a defined set of product pages, checking that collection is permitted, extracting a clearly identified price, and saving timestamped observations for comparison. Use Playwright only when the page needs browser rendering or interaction; otherwise, an authorized feed, API, or available structured data may be simpler. The example below is a small, site-specific template—not a universal scraper. You must adapt its locator, price rules, and collection cadence to each target.
Plan what the monitor will track
Start with a short inventory rather than a broad crawl. A URL must map to the product and variant you intend to compare; otherwise, price changes can be confused with a different size, pack, region, or offer.
- Target: the site and product page URL.
- Identity: an internal product key and the visible product or variant label.
- Comparison basis: expected region and currency, and whether you mean list, sale, member, unit, tax-inclusive, or shipping-inclusive price.
- Collection rules: a permitted cadence and the source or method you are authorized to use.
Check the site’s current terms, documented data-access options, and crawler directives before collecting. RFC 9309 describes robots.txt as crawler rules, not permission: “These rules are not a form of access authorization.” Follow applicable parseable rules, but do not treat a robots.txt allowance as legal authorization. If access is denied, a page blocks collection, or the site’s terms do not allow your approach, stop and use an authorized source or seek permission. RFC 9309
Choose the least complex permitted data route
Inspect the target page and any authorized structured source before automating a browser. Schema.org defines offers as an offer to provide an item, and PriceSpecification describes offer price concepts. If relevant offer data is present and suitable, it may be easier to inspect than rendered page text. Its presence and accuracy are not guaranteed on a particular site. Schema.org offers · Schema.org PriceSpecification
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 match#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Use ordinary response parsing or a documented feed/API when that is permitted and exposes the needed data. Use Playwright when the price genuinely depends on browser rendering or interaction. A browser does not make collection authorized, and browser automation’s actionability checks do not prove that a price has loaded or that the matched text is the right price.
Set up a small Python and Playwright project
Install Playwright’s Python package and its browser binaries in your environment. The exact installation steps can vary by operating system and project setup, so follow the current Playwright Python installation guide. Keep target URLs and site-specific extraction rules in configuration rather than embedding a guessed selector that you reuse across unrelated sites.
This illustrative example uses one configured product page and a human-facing text locator. Replace the URL, expected currency, product identity, and locator with values verified for a permitted target. The example deliberately treats a missing or ambiguous price as an extraction failure rather than converting it to zero.
Rank #2
- Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
- Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
- CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
- CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
- CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)
from datetime import datetime, timezone
from decimal import Decimal
import re
from playwright.sync_api import sync_playwright
TARGET = {
"product_key": "item-001",
"url": "https://example.com/product",
"expected_currency": "USD",
# Replace with text that identifies the product-specific price on this page.
"price_text": "$19.99",
}
def parse_price(text: str, currency: str) -> Decimal:
# Example only: this parser assumes a US-style decimal amount.
# Adapt it for the target's locale, currency symbol, and price conventions.
cleaned = text.replace(",", "").strip()
match = re.search(r"d+(?:.d{1,2})?", cleaned)
if not match:
raise ValueError(f"No numeric price found in {text!r}")
return Decimal(match.group(0))
def observe(target: dict) -> dict:
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=True)
page = browser.new_page()
try:
page.goto(target["url"], wait_until="domcontentloaded", timeout=30_000)
# Make this a site-specific condition for the actual price content.
price = page.get_by_text(target["price_text"], exact=True)
price.wait_for(state="visible", timeout=10_000)
text = price.inner_text().strip()
amount = parse_price(text, target["expected_currency"])
return {
"product_key": target["product_key"],
"url": target["url"],
"captured_at": datetime.now(timezone.utc).isoformat(),
"amount": str(amount),
"currency": target["expected_currency"],
"displayed_price": text,
"status": "ok",
"failure_reason": None,
}
finally:
browser.close()
The sample is a scaffold, not tested against a live retailer. Its example.com URL and text are placeholders for a target you have permission to monitor. The parser assumes a US-style decimal representation and should not be used unchanged for other locales, currencies, or pages with multiple prices.
Inspect the page and build a target-specific locator
First identify which visible price belongs to the intended product and offer. A page may show a crossed-out list price, current sale price, unit price, another variant’s price, or a membership-only amount. Scope the locator to the relevant product or offer region where the page supports that structure, then find the intended price within it.
Playwright calls locators central to auto-waiting and retryability and recommends starting with user-facing attributes such as role, text, label, or placeholder. It cautions that long CSS or XPath chains tied to DOM structure can be brittle. Prefer a stable, scoped locator and treat multiple plausible matches as an error to investigate rather than selecting the first match silently. Playwright Python locator guidance
Rank #3
- Not including the Raspberry Pi 5 (8GB), the Crowpi advanced version comes with the Raspberry Pi 5
- ELECROW Black Case for the Raspberry Pi 5, CrowPi is equipped with a 9-inch HD touchscreen along with a camera; All the regular components used in DIY electronics are packed into the CrowPi development board, such as LCD, LED matrix, buzzer, light sensor, PIR sensor, ultrasonic sensor, IR sensor, etc
- Raspberry Pi Sensors: The Crowpi raspberry pi 5 programming kit is jam-packed with lots of buttons such as 19 different sensors in a tidy easy to use package; You don't have to wait and wire things
- Build Quality: Solid ABS shell and well made components in one place make it strong and convenient to travel
- Programming Lessons: This raspberry pi 5 learning kit ships with step by step instructions and provides 21 lessons to take you through identifying components reading code and running it in the terminal
Wait for a site-specific price condition, not merely for navigation to finish. Playwright checks actionability before actions such as clicking; that helps interaction reliability but does not establish that asynchronously loaded text is semantically correct. Validate that the result is non-empty, has the expected currency and format, and corresponds to the intended product and price definition. Playwright auto-waiting and actionability
Normalize price and availability before comparing
Keep the numeric amount separate from the currency code, and parse using the target’s locale conventions. Use a decimal representation for money rather than binary floating-point arithmetic. Preserve the displayed price text when practical so that a surprising parse can be checked against what the page showed.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Compare the same product variant, pack size, region, and currency.
- Choose whether the tracked amount is list price, sale price, member price, or another clearly defined offer.
- Decide whether tax, shipping, discounts, and unit pricing are included in the comparison.
- Record availability only when the page exposes it clearly; do not infer stock status from a missing price.
- When a value is missing, duplicated, or ambiguous, record a failed extraction with a reason—not a price of zero.
Save timestamped observations
Store a history, not just the latest number. A practical observation can include the target site, canonical product URL, internal product key, observed product or variant label, UTC capture time, numeric amount, currency, clearly exposed availability, extraction status, and a concise failure reason. This is a design choice, not a universal schema; Schema.org’s offer vocabulary describes price concepts but does not prescribe a monitoring database.
Rank #4
- Fully assembled for plug-and-play operation
- Includes Raspberry Pi 5 with 8GB RAM
- 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
- M.2 HAT+
- CanaKit Turbine Black Case for the Pi 5
SQLite is a reasonable local option for a single-user prototype. Store each successful observation as a new record so you can distinguish a real change from an extraction failure and review what the monitor saw over time. Keep failures as separate status records; never overwrite the last good price with a missing value.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Compare observations and alert conservatively
For each product key, compare a new successful observation with the prior successful observation for the same variant and comparison basis. Configure a meaningful threshold, such as a chosen absolute or percentage change, rather than alerting on every tiny fluctuation. Availability changes can be a separate alert condition when stock status is reliably exposed.
An alert should include the old and new amounts, currency, capture time, and source page so someone can verify the change. Do not generate a price-change alert from a parse failure, a currency mismatch, or an unmatched product variant.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Schedule the monitor and handle failures
Choose a cadence justified by the business need and allowed by the target’s terms and access rules; there is no universally appropriate interval. Use timeouts, bounded retries, logging, and a clear way to disable an individual target. Log navigation errors, selector timeouts, ambiguous matches, and parsing failures distinctly so page changes do not masquerade as price changes.
Keep collection restrained and identify your crawler honestly where relevant. If a target blocks access or presents an access-control barrier, stop rather than rotating identities or attempting to bypass it. For unattended operation, use an environment you can monitor and maintain; hosting is an operational choice, not a way to evade a site’s restrictions.
Quick Recap
Common failure modes to plan for
- The selector stops matching: the page changed. Mark the observation failed, inspect the current product area, and update the site-specific locator.
- The page shows several prices: scope extraction to the correct offer and define which price type is tracked; do not accept the first numeric text found.
- The amount parses incorrectly: handle locale-specific separators and currency formatting, and validate against the displayed text.
- The product or region changed: verify product identity, variant, pack size, and region before comparing values.
- The site denies or blocks access: stop collection and use a documented authorized data route or obtain permission.
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.

