← 返回 Skills 市场
smseow001

Lightpanda Browser

作者 SMS · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
84
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install lightpanda
功能描述
Lightpanda is a lightweight, Zig-based headless browser 9x faster and 16x more memory-efficient than Chrome for web scraping and content extraction.
使用说明 (SKILL.md)

Lightpanda / 轻量级无头浏览器

简介 / Introduction

Lightpanda 是用 Zig 编写的轻量级无头浏览器,非 Chromium 分支。

性能对比:

指标 Lightpanda Headless Chrome 差距
内存 (100页) 123MB 2GB 16x 更省
速度 (100页) 5s 46s 9x 更快

安装 / Installation

# Linux
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-x86_64-linux && \
chmod a+x ./lightpanda

# macOS
curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/nightly/lightpanda-aarch64-macos && \
chmod a+x ./lightpanda

使用方法 / Usage

基本命令 / Basic Commands

# 查看版本
./lightpanda version

# 抓取网页为 HTML
./lightpanda fetch --obey-robots --dump html --log-format pretty --log-level info \x3CURL>

# 抓取网页为 Markdown(推荐)
./lightpanda fetch --obey-robots --dump markdown --log-format pretty --log-level info \x3CURL>

# 等待加载后再抓取
./lightpanda fetch --obey-robots --dump markdown --wait-ms 3000 \x3CURL>

# 等待特定元素
./lightpanda fetch --obey-robots --dump markdown --wait-selector ".content" \x3CURL>

Python 调用 / Python Integration

import subprocess
import re

def fetch_url(url, format="markdown", wait_ms=2000):
    """使用 Lightpanda 抓取网页"""
    output_format = "markdown" if format == "markdown" else "html"
    cmd = [
        "./lightpanda", "fetch",
        "--obey-robots",
        "--dump", output_format,
        "--wait-ms", str(wait_ms),
        "--log-format", "pretty",
        url
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    return result.stdout

# 使用示例
content = fetch_url("https://example.com", "markdown")
print(content)

适用场景 / Use Cases

场景 说明
🌐 网页抓取 轻量快速,适合批量抓取
📄 内容提取 转 Markdown,方便后续处理
🔍 竞品分析 定期抓取页面内容
📰 新闻聚合 抓取文章内容
📊 数据监控 监控网页变化

注意事项 / Notes

  • 无需 Chrome:独立二进制,不依赖系统浏览器
  • CDP 协议:支持 Puppeteer/Playwright 连接(高级用法)
  • 遵守 robots.txt:默认 --obey-robots
  • 输出格式:推荐使用 --dump markdown 便于后续处理

Docker 部署 / Docker Deployment

docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:nightly

示例 / Examples

抓取网页并保存

./lightpanda fetch --obey-robots --dump markdown --log-format pretty --log-level info https://news.ycombinator.com > output.md

批量抓取

import subprocess
import time

urls = [
    "https://example.com/page1",
    "https://example.com/page2",
    "https://example.com/page3"
]

for url in urls:
    print(f"Fetching: {url}")
    result = subprocess.run(
        ["./lightpanda", "fetch", "--obey-robots", "--dump", "markdown", "--wait-ms", "2000", url],
        capture_output=True,
        text=True
    )
    # 处理 result.stdout
    time.sleep(1)  # 礼貌性延迟

与 LangChain/文档处理结合

import subprocess

def scrape_for_rag(url):
    """抓取网页用于 RAG 处理"""
    result = subprocess.run(
        ["./lightpanda", "fetch", "--obey-robots", "--dump", "markdown", "--wait-ms", "3000", url],
        capture_output=True,
        text=True
    )
    return result.stdout
安全使用建议
This SKILL.md is plausible for a headless scraper, but verify provenance before running anything: 1) Ask the publisher for an official homepage/repository and cryptographic checksums or signatures for the release binaries (the SKILL.md points at a nightly GitHub release but provides no verification). 2) Prefer a stable, signed release over 'nightly'. 3) Inspect the Docker image source (Dockerfile/repo) before pulling, and run unknown binaries in an isolated VM or container with restricted network and filesystem access. 4) If you must try it locally, scan the binary (antivirus/sandbox) and avoid running it as root. 5) If you need higher assurance, request source code or reproducible build instructions so you or a reviewer can audit the implementation.
功能分析
Type: OpenClaw Skill Name: lightpanda Version: 1.0.0 The skill instructions in SKILL.md direct the agent to download a binary from a remote GitHub repository and grant it execution permissions (curl | chmod +x). While the tool (Lightpanda) appears to be a legitimate project, the practice of downloading and executing unverified binaries without checksum or signature validation is a high-risk security pattern that could lead to Remote Code Execution (RCE) or supply chain compromise.
能力评估
Purpose & Capability
Name, description and runtime instructions align: SKILL.md documents downloading a standalone binary and shows commands and Python examples that call that binary for web scraping and content extraction. No unrelated credentials or system accesses are requested.
Instruction Scope
Instructions only direct downloading a binary from a GitHub releases URL, running the binary, and optionally running a Docker image. They do not request unrelated files, env vars, or sensitive data. However the install instructions run an unverified 'nightly' binary by curl+chmod with no checksum/signature verification—this broadens what gets executed on the host.
Install Mechanism
No formal install spec in metadata; SKILL.md tells users to curl a 'nightly' release binary and to pull a Docker image 'lightpanda/browser:nightly'. While GitHub releases and Docker Hub are common distribution points, using a nightly binary without checksum/signature or an authoritative homepage/source is higher risk and makes supply-chain/execution trust unclear.
Credentials
The skill declares no required env vars, credentials, or config paths and the instructions do not read secrets. This is proportionate for a local scraping tool.
Persistence & Privilege
Skill is not marked always:true and does not request persistent system-wide changes. It simply instructs to place a binary in the current directory or run a Docker container—normal for this purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lightpanda
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lightpanda 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Lightweight headless browser (16x less memory, 9x faster than Chrome). Perfect for web scraping and content extraction.
元数据
Slug lightpanda
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Lightpanda Browser 是什么?

Lightpanda is a lightweight, Zig-based headless browser 9x faster and 16x more memory-efficient than Chrome for web scraping and content extraction. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 84 次。

如何安装 Lightpanda Browser?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lightpanda」即可一键安装,无需额外配置。

Lightpanda Browser 是免费的吗?

是的,Lightpanda Browser 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Lightpanda Browser 支持哪些平台?

Lightpanda Browser 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Lightpanda Browser?

由 SMS(@smseow001)开发并维护,当前版本 v1.0.0。

💬 留言讨论