Loading...
Loading...
Compare original and translation side by side
brew install --cask google-chromesudo apt install google-chrome-stablewinget install Google.Chrometrafilaturabrew install --cask google-chromesudo apt install google-chrome-stablewinget install Google.Chrometrafilaturapython <skill-path>/scripts/web_fetch.py --url "https://example.com/article"python <skill-path>/scripts/web_fetch.py --url "https://example.com/article"python <skill-path>/scripts/web_fetch.py --url "https://example.com/a" --url "https://example.com/b"python <skill-path>/scripts/web_fetch.py --url "https://example.com/a" --url "https://example.com/b"echo "https://example.com/article" | python <skill-path>/scripts/web_fetch.pyecho "https://example.com/article" | python <skill-path>/scripts/web_fetch.pyundefinedundefinedundefinedundefined| Flag | Default | Description |
|---|---|---|
| — | URL to fetch (repeatable) |
| | Output format: |
| stdout | Write to file instead of stdout (recommended for large results) |
| | Wait time for JS rendering in milliseconds |
| | Per-URL timeout in seconds |
| | Max characters per page |
| | URLs per batch (Chrome restarts between batches for stability) |
| auto | CDP debugging port (default: auto-detect free port) |
| 标志 | 默认值 | 描述 |
|---|---|---|
| — | 要获取的URL(可重复指定) |
| | 输出格式: |
| stdout | 将输出写入文件而非标准输出(大结果场景推荐使用) |
| | JS渲染等待时间(毫秒) |
| | 每个URL的超时时间(秒) |
| | 每页最大字符数 |
| | 每批处理的URL数量(为保证稳定性,批处理之间会重启Chrome) |
| auto | CDP调试端口(默认:自动检测可用端口) |
------[
{
"url": "https://news.google.com/rss/articles/...",
"final_url": "https://www.theguardian.com/actual-article",
"success": true,
"content": "Article text content..."
}
][
{
"url": "https://example.com/broken",
"success": false,
"error": "Page load timeout"
}
][
{
"url": "https://news.google.com/rss/articles/...",
"final_url": "https://www.theguardian.com/actual-article",
"success": true,
"content": "Article text content..."
}
][
{
"url": "https://example.com/broken",
"success": false,
"error": "Page load timeout"
}
]--headless=new --remote-debugging-port=PORT --user-data-dir=TMPDIRPage.navigateloadEventFiredRuntime.evaluateDOM.getOuterHTMLtrafilatura--headless=new --remote-debugging-port=PORT --user-data-dir=TMPDIRPage.navigateloadEventFiredRuntime.evaluateDOM.getOuterHTMLtrafilatura--user-data-dir--user-data-dir| Platform | Chrome Paths Checked |
|---|---|
| macOS | |
| Linux | |
| Windows | |
PATH| 平台 | 检查的Chrome路径 |
|---|---|
| macOS | |
| Linux | |
| Windows | |
127.0.0.1127.0.0.1