返回全部资讯
Simon Willison 博客T2·开发与工程

webframe 评测:轻量级网页执行与沙箱工具

原标题:webframe: evaluated as a scraper and a sandbox
42AI 研判分

开发者 Simon Willison 对开源工具 webframe 进行了技术评测。该工具基于 Go 语言构建,利用系统原生浏览器引擎(如 WKWebView)在隐藏无头视图中执行网页代码,并将控制台输出重定向至标准流。相比依赖 Playwright 的同类工具,webframe 提供了更轻量的替代方案,适合需要快速运行网页脚本或进行简单数据抓取的开发者。

报道正文

Research: webframe: evaluated as a scraper and a sandbox

webframe is a neat little project from Jeff Lindsay which lets you "run a web page like a program" - you point it at a URL or file and it executes it in a hidden headless web view and outputs console.log() to standard output and any exceptions to standard error.

It's written in Go on top of the glaze library, which provides access to a system browser ("WKWebView on macOS, WebKitGTK on Linux, WebView2 on Windows") so it doesn't need to bundle its own browser engine.

It reminds me of my own shot-scraper javascript tool, albeit in a much smaller package that doesn't depend on Playwright.

I had Claude Opus 5.5 put it through its paces and prepare a research report for me. Here's the prompt I used:

Explore https://github.com/tractordev/webframe try running it and put it though its paces, build a few exploratory prototypes, then evaluate it as a potential sandboxing tool and as a tool for scraping web pages using the same patterns encouraged by the "shot-scraper JavaScript" command (see simonw/shot-scraper on GitHub, docs directory)

Tags: browsers, go, javascript, jeff-lindsay, shot-scraper