返回顶部
w

web-screenshot

🖼️ 任意URL全页面截图 + PDF导出工具。当用户要求截取网页、保存网页快照、截图存档、做QA对比、导出PDF时使用。支持百度/知乎/微信公众号/小红书等中文网站,自动等待JS渲染交付PNG/JPG/PDF。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.1.3
安全检测
已通过
1,038
下载量
0
收藏
概述
安装方式
版本历史

web-screenshot

## When to Use(中文场景) - 用户要求「截取某个网页」 - 用户要求「保存网页快照」「截图存档」 - 做 QA 对比、报告配图 - 需要把网页导出为 PDF - 快速查看某个 URL 的视觉效果 - **登录后才可见的页面**:不支持,详见 Limitations ## 适用场景示例 ``` 用户:"帮我截一下这个知乎回答" 用户:"把百度搜索结果截图发给我" 用户:"这个公众号文章截图存档" 用户:"把这个页面导出PDF" 用户:"全页面截图,要看到页面底部" ``` ## Tool Playwright Node.js (via npx cache, no install needed) Path: `/root/.npm/_npx/e41f203b7505f1fb/node_modules` ## Quick Use — Shell Script ```bash bash skills/web-screenshot/scripts/screenshot.sh <url> [output] [--fullpage|--pdf] ``` Examples: ```bash # Basic screenshot (viewport) bash scripts/screenshot.sh https://www.baidu.com /tmp/baidu.png # Full-page screenshot (scrolls to capture entire page) bash scripts/screenshot.sh https://example.com /tmp/full.png --fullpage # PDF export bash scripts/screenshot.sh https://example.com /tmp/page.pdf --pdf ``` ## Quick Use — Inline Node.js ```bash NODE_PATH=/root/.npm/_npx/e41f203b7505f1fb/node_modules node -e " const { chromium } = require('playwright'); (async () => { const browser = await chromium.launch({ headless: true, args: ['--no-sandbox'] }); const page = await browser.newPage({ viewport: { width: 1440, height: 900 } }); await page.goto('YOUR_URL', { waitUntil: 'domcontentloaded', timeout: 15000 }); await page.waitForTimeout(2000); await page.screenshot({ path: '/tmp/output.png', fullPage: false }); await browser.close(); })().catch(e => { console.error(e.message); process.exit(1); }); " ``` ## Parameters | Parameter | Default | Notes | |-----------|---------|-------| | URL | required | Target URL, must be valid | | output path | auto timestamp | `/tmp/openclaw/screenshot_YYYYMMDD_HHMMSS.png` | | `--fullpage` | viewport only | Captures entire scrollable page | | `--pdf` | screenshot | Exports as A4 PDF | ## Tips - For Chinese content: Playwright handles UTF-8 fine, no extra config needed - For dynamic pages: increase `waitForTimeout` (e.g. `5000` instead of `2000`) - For PDF: `printBackground: true` ensures background colors/images are included - Output size: ~100-150KB for typical pages, ~300KB+ for full-page ## Limitations **Login-gated / anti-automation pages**: Some sites detect headless browsers and return blank content. Workaround: - Use the site's API for data instead of screenshots - Use a real logged-in browser for those pages - Public static pages work fine **Known sites with issues**: GitHub (sometimes), A2H Market (confirmed), sites with Cloudflare protection

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 web-screenshot-1776122715 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 web-screenshot-1776122715 技能

通过命令行安装

skillhub install web-screenshot-1776122715

下载 Zip 包

⬇ 下载 web-screenshot v1.1.3

文件大小: 3.7 KB | 发布时间: 2026-4-14 10:02

v1.1.3 最新 2026-4-14 10:02
v1.1.3: 优化描述为功能导向,提升搜索排名;增加中文使用场景示例

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部