---
id: 16926
lang: en
title: "webframe runs a page's JavaScript from the terminal and keeps pace with shot-scraper on speed"
published_at: "2026-10-26 16:15:00"
source_name: "Simon Willison"
source_url: "https://simonwillison.net/2026/Oct/26/webframe-evaluation/"
canonical_url: "https://news.hamidun.com/en/news/16926"
categories: ["llm", "research"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# webframe runs a page's JavaScript from the terminal and keeps pace with shot-scraper on speed

> **Краткая суть (BLUF):** Need to pull data from a page that JavaScript renders, without installing heavy Playwright? webframe opens the address in a hidden window of the browser built into your system and prints the result to the terminal. In a test set by Simon Willison, its speed was comparable to his scraper shot-scraper, but it hit failures caused by site security policies (CSP) and hanging loads. It works for scraping, but it is too early to treat it as a sandbox.  - Written in Go, it uses WKWebView, WebKitGTK or WebView2 - The window is 0×0, so layout and lazy loading may behave incorrectly - There is no response code or headers: a 404 page cannot be told apart from a normal one

Many modern sites serve an empty shell, and JavaScript draws the data in the browser afterward. To extract such data with a script, people usually install Playwright (a library that controls a full browser) and pull in a separate browser engine. The webframe project by Jeff Lindsay promises a lighter path: "run a web page as a program." You specify an address or a file, and the tool executes the page in a hidden window of a browser that already exists on the system. Everything the page prints to the console appears in the terminal. Simon Willison asked an AI agent to test how well this works in practice and compared the result with his own tool, shot-scraper. It is a scraping utility: the command `shot-scraper javascript` opens a page, runs your code on it, and returns the data as JSON. For those who build scrapers and code execution environments, the outcome of this evaluation is useful.

## How it works

webframe is written in Go and relies on a library that calls the operating system's browser engine: WKWebView on macOS, WebKitGTK on Linux, and WebView2 on Windows. It does not bundle its own browser, so the tool is more compact than Playwright-based solutions and does not depend on them.

It follows the familiar Unix utility model. Page output goes to standard output (stdout), and unhandled exceptions go to standard error (stderr). The result is easy to pipe into jq, write to a file, or pass to another script.

Willison tested two scenarios. The first was scraping using the same patterns that `shot-scraper javascript` encourages: open a page, run a snippet of code, and get the data. The second was the sandbox role, that is, a way to run third-party or generated code in an isolated environment. The agent was asked to run the project, build several prototypes, and write a report.

## What the test showed

The main point in webframe's favor is that it is a fast and lightweight way to run browser JavaScript, suitable for scraping. Its speed is comparable to shot-scraper. For tasks like "open a page, pull a table, print JSON" this is sufficient.

The list of rough edges is also concrete:

- **CSP failures.** Content Security Policy is a set of security rules a site sets for the browser. On some pages they block your script from being injected and executed, and those pages could not be processed.
- **0×0 window.** The hidden window has zero width and height. Code that depends on screen dimensions (responsive layout, lazy loading of images, measuring elements) may behave incorrectly.
- **Hanging loads.** Some pages loaded but never finished.
- **No HTTP metadata.** The response code and headers are unavailable. For a scraper this matters: without them you cannot tell a 404 page from a normal one.
- **Limited browser control.** The set of settings is restricted, and you cannot flexibly change the launch environment.

## What to do with this

If you need a lightweight scraper on a single machine, especially on macOS where the system WebKit is already present, webframe is worth trying: fewer dependencies, simpler deployment, fast startup. For CI and containers, keep in mind that Linux requires WebKitGTK.

For production scraping, Playwright or shot-scraper remain the more reliable choice for now. Without response codes and predictable load completion, it is hard to build retries and monitoring. As a sandbox for code written by agents, the project is also too early to adopt. The system browser provides lightness, but the evaluation does not present isolation as a strength. Running untrusted code makes sense only with separate protection at the OS or container level.

There is also a caveat about the report itself. This is an assessment made by an AI agent on Willison's assignment, and the available text contains no detailed timing measurements. The claim that speed is "comparable" should be verified on your own pages. Still, the set of identified problems is specific and points to where to look first. If the author adds response codes and a normal window size, webframe could become a serious lightweight alternative to heavy stacks for browser automation.

---
- **Первоисточник:** [Simon Willison](https://simonwillison.net/2026/Oct/26/webframe-evaluation/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/16926
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
