webframe 评测:把网页当程序跑的抓取与沙箱工具
webframe: evaluated as a scraper and a sandbox
一个几十 MB 的小工具,能把网页当代码直接跑,抓数据和做沙箱都行,还不用装 Playwright,Claude 帮忙实测过了。
Jeff Lindsay 开源的 webframe 用 Go 编写,基于 glaze 库调用系统浏览器(macOS 用 WKWebView、Linux 用 WebKitGTK、Windows 用 WebView2),无需自带浏览器引擎。它可以把任意 URL 或文件在无头 WebView 中执行,console.log() 输出到标准输出,异常输出到标准错误。Simon Willison 让 Claude Opus 5.5 对它做了实测,评估其作为网页抓取工具和沙箱的潜力,并对比了自己依赖 Playwright 的 shot-scraper javascript 工具。
webframe: evaluated as a scraper and a sandbox
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