web-pilot

TotalClaw 作者 totalclaw

无需 API 密钥即可搜索网络并阅读页面内容。当您需要通过 DuckDuckGo/Brave/Google(多页)进行搜索、从 URL 中提取可读文本、使用持久可见浏览器进行交互浏览(使用选项卡、单击、屏幕截图、文本搜索)、下载文件/PDF 或关闭 cookie 横幅时使用。支持 JSON/markdown/文本输出。由 Playwright + Chromium 提供支持。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~liranudi-web-pilot
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~liranudi-web-pilot/file -o liranudi-web-pilot.md
## 概述(中文)

无需 API 密钥即可搜索网络并阅读页面内容。当您需要通过 DuckDuckGo/Brave/Google(多页)进行搜索、从 URL 中提取可读文本、使用持久可见浏览器进行交互浏览(使用选项卡、单击、屏幕截图、文本搜索)、下载文件/PDF 或关闭 cookie 横幅时使用。支持 JSON/markdown/文本输出。由 Playwright + Chromium 提供支持。

## 原文

# Web Pilot

Four scripts, zero API keys. All output is JSON by default.

**Dependencies:** `requests`, `beautifulsoup4`, `playwright` (with Chromium).
**Optional:** `pdfplumber` or `PyPDF2` for PDF text extraction.

Install: `pip install requests beautifulsoup4 playwright && playwright install chromium`

## 1. Search the Web

```bash
python3 scripts/google_search.py "query" --pages N --engine ENGINE
```

- `--engine` — `duckduckgo` (default), `brave`, or `google`
- Returns `[{title, url, snippet}, ...]`

## 2. Read a Page (one-shot)

```bash
python3 scripts/read_page.py "https://url" [--max-chars N] [--visible] [--format json|markdown|text] [--no-dismiss]
```

- `--format` — `json` (default), `markdown`, or `text`
- Auto-dismisses cookie consent banners (skip with `--no-dismiss`)

## 3. Persistent Browser Session

```bash
python3 scripts/browser_session.py open "https://url"              # Open + extract
python3 scripts/browser_session.py navigate "https://other"        # Go to new URL
python3 scripts/browser_session.py extract [--format FMT]          # Re-read page
python3 scripts/browser_session.py screenshot [path] [--full]      # Save screenshot
python3 scripts/browser_session.py click "Submit"                  # Click by text/selector
python3 scripts/browser_session.py search "keyword"                # Search text in page
python3 scripts/browser_session.py tab new "https://url"           # Open new tab
python3 scripts/browser_session.py tab list                        # List all tabs
python3 scripts/browser_session.py tab switch 1                    # Switch to tab index
python3 scripts/browser_session.py tab close [index]               # Close tab
python3 scripts/browser_session.py dismiss-cookies                 # Manually dismiss cookies
python3 scripts/browser_session.py close                           # Close browser
```

- Cookie consent auto-dismissed on open/navigate
- Multiple tabs supported — open, switch, close independently
- Search returns matching lines with line numbers
- Extract supports json/markdown/text output

## 4. Download Files

```bash
python3 scripts/download_file.py "https://example.com/doc.pdf" [--output DIR] [--filename NAME]
```

- Auto-detects filename from URL/headers
- PDFs: extracts text if pdfplumber/PyPDF2 installed
- Returns `{status, path, filename, size_bytes, content_type, extracted_text}`