Aaronxx

browser-auto-download

开发编程v1.0.1
作者:Aaronxx更新于 2026-05-17共 2 个版本 · 最新版本发布于 2026-02-04@clawhub_aaronxx/browser-auto-download
脚本工具#Browser

据 AlphaMoat 统计,截至 2026-09,browser-auto-download 累计下载 3,294 次、获 1 个星标,在全部 5,078 个 AI 技能中排名第 3,446 位,在「开发编程」分类(577 个)中排名第 441 位。

累计安装
101
累计下载
3,294
星标
1
全站排名
#3,446
全站前 68% · 「开发编程」前 77%
平台累计安装累计下载星标评论
ClawHub ↗1013,04411
SkillHub ↗1003,2941—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

它适用于客户端渲染、自动下载或多步导航的页面,而非直接文件 URL。浏览器可能从不可信页面保存安装程序;应仅访问可信站点、检查文件名和平台版本,并在打开或安装前验证来源或签名。调试模式还可能保存页面截图、HTML 或文本,应避免用于含敏感内容的页面。

资料发布于 2026-10-29

可以用来做什么

  • 处理需要浏览器交互的动态下载流程。
  • 规划从主页跳转至平台版本页面并确认下载结果。
  • 检查所选安装文件的名称、平台和来源。

什么时候用

  • 直接下载 URL 不适用且网页需要动态加载或交互时。
  • 下载流程需要选择系统版本或点击页面控件时。
  • 获取可执行文件或访问登录页面时,应先确认 URL 可信并核对下载内容和调试产物。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

概述 Browser Auto Download 的多阶段网页下载能力及适用边界。
为下载一个安装程序拟定站点、平台版本、文件签名和调试文件检查清单;不要实际下载。

月度数据趋势

累计下载3,294
2,4752,9153,3552026-05 · 累计下载 2,5362026-06 · 累计下载 2,6852026-07 · 累计下载 2,9162026-08 · 累计下载 3,0622026-09 · 累计下载 3,29426-0526-09
星标1
0122026-05 · 星标 12026-06 · 星标 12026-07 · 星标 12026-08 · 星标 12026-09 · 星标 126-0526-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,294—1
2026-083,062+5.0%1
2026-072,916+8.6%1
2026-062,685+5.9%1
2026-052,536—1

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

7.5 KB · ClawHub v1.0.1
---
name: browser-auto-download
version: "4.1.0"
description: "Browser-automated file download with enhanced features. Auto-detects platform (Windows/macOS/Linux, 64/32-bit, ARM/Intel), handles multi-step navigation (homepage to platform-specific pages), captures auto-downloads triggered on page load, and falls back to button clicking when needed. Ideal for complex download flows where curl/wget fail due to client-side rendering, automatic downloads, or multi-page navigation. Features page scrolling for lazy content, extended wait times, and Golang support."
---

# Browser Auto Download v4.1.0 (Enhanced)

Download files from dynamic webpages with **intelligent detection and multi-step navigation**.

展开全部(共 277 行)
## Key Features

- **Auto-download capture**: Detects downloads triggered automatically on page load
- **Multi-step navigation**: Finds and navigates to platform-specific pages (PC/Desktop versions)
- **Platform auto-detection**: Windows x64/ARM64, macOS Intel/Apple Silicon, Linux
- **Event listening**: Captures all download events without requiring button clicks
- **Smart fallback**: Tries multiple strategies (auto-download, navigation, clicking)

## When to Use

Use this skill for:
- **Auto-download sites**: Downloads start automatically when page loads
- **Multi-step flows**: Homepage - click "PC version" - download page
- **Dynamic content**: Download links generated via JavaScript
- **Interactive downloads**: Requires clicking buttons or navigating UI

**NOT for**: Direct file URLs (use `curl`/`wget` instead)

## Quick Start

### Option 1: Automatic (Recommended)

```bash
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://example.com/download"
```

The script will:
1. Check for auto-downloads on page load
2. Look for platform-specific page links (PC/Desktop version)
3. Navigate if needed
4. Try clicking download buttons as fallback

### Option 2: Built-in Shortcuts

```bash
# WeChat DevTools
python skills/browser-auto-download/scripts/auto_download.py --wechat

# Meitu Xiuxiu
python skills/browser-auto-download/scripts/auto_download.py --meitu
```

### Option 3: Python Module

```python
from skills.browser-auto-download.scripts.auto_download import auto_download

result = auto_download(
    url="https://example.com/download",
    auto_select=True,   # Platform detection
    auto_navigate=True  # Multi-step navigation
)

if result:
    print(f"Downloaded: {result['path']}")
```

## How It Works

### Three-Stage Strategy

**Stage 1: Auto-Download Detection**
```
Page loads - Check for downloads - Success?
    Yes:                    No:
    Save file               Go to Stage 2
```

**Stage 2: Multi-Step Navigation**
```
Look for "PC/Desktop" link - Navigate - Check downloads - Success?
    Yes:                        No:
    Save file                  Go to Stage 3
```

**Stage 3: Button Clicking**
```
Try multiple selectors - Click - Wait for download - Save
```

### Platform-Specific Page Detection

Automatically finds links like:
- "meitu for PC" - pc.meitu.com
- "Desktop version" - desktop.example.com
- "Windows Download" - windows.example.com

Keywords: `pc`, `desktop`, `windows`, `mac`, `download`, `电脑`, `桌面`, `客户端`

## Examples

### Auto-Download Sites (Best Case)

```bash
# Sites that trigger download on page load
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://pc.meitu.com/en/pc?download=pc"
```

### Multi-Step Navigation

```bash
# Homepage - PC version - Download
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://xiuxiu.meitu.com/" \
  --auto-navigate  # Enable (default: True)
```

### Manual Selector (Fallback)

```bash
# If auto-detection fails
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://example.com/download" \
  --selector "button:has-text('Download for free')"
```

### Disable Features

```bash
# Don't navigate to platform pages
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://example.com" \
  --no-auto-navigate

# Don't detect platform
python skills/browser-auto-download/scripts/auto_download.py \
  --url "https://example.com" \
  --no-auto-select
```

## Platform Detection

| System | Architecture | Keywords Used |
|--------|--------------|---------------|
| Windows | AMD64/x86_64 | windows, win64, x64, 64-bit, pc |
| Windows | x86/i686 | windows, win32, x86, 32-bit, pc |
| macOS | ARM64 (M1/M2/M3) | macos, arm64, apple silicon |
| macOS | x86_64 (Intel) | macos, x64, intel |
| Linux | x86_64 | linux, x64, amd64 |

## Troubleshooting

**Download not starting**:
- Use `--headless` (default: False) to observe the process
- Check stderr for auto-download messages
- Try `--no-auto-navigate` if navigation is causing issues
- Use `--selector` to manually specify button

**Wrong version downloaded**:
- Check platform detection in stderr output
- Use `--no-auto-select` and manually specify `--selector`
- Verify the site offers multiple versions

**Navigation going to wrong page**:
- Disable with `--no-auto-navigate`
- The site may not have platform-specific pages

**File not saved**:
- Check write permissions in output directory
- Ensure sufficient disk space
- Wait for large files (up to 3 minutes)

## Output Format

### stderr (Progress)
```
Starting browser (visible)...
Opening: https://example.com
Checking for auto-downloads...
Checking for platform-specific page link...
Found platform page: https://pc.example.com
Navigating to platform page...
Download detected: software_v2.1.0_win64.exe
Saving: software_v2.1.0_win64.exe

SUCCESS!
File: C:\Users\User\Downloads\software_v2.1.0_win64.exe
Size: 231.9 MB
```

### stdout (JSON result)
```json
{
  "path": "C:\\Users\\User\\Downloads\\software_v2.1.0_win64.exe",
  "filename": "software_v2.1.0_win64.exe",
  "size_bytes": 243209941,
  "size_mb": 231.9,
  "platform": "Windows AMD64"
}
```

## Real-World Examples

### Meitu Xiuxiu (Multi-step + Auto-download)

```python
from auto_download import quick_download_meitu

result = quick_download_meitu()
# Flow: Homepage - PC page link - Navigate - Auto-download
```

### WeChat DevTools (Button click)

```python
from auto_download import quick_download_wechat_devtools

result = quick_download_wechat_devtools()
# Flow: Homepage - Click "Stable Windows 64" - Download
```

### Generic Software (Mixed)

```python
result = auto_download(
    url="https://example.com/downloads",
    auto_select=True,    # Detect Windows 64-bit
    auto_navigate=True   # Find "Desktop version" link
)
```

## Requirements

```bash
pip install playwright
playwright install chromium
```

## Advanced Usage

### Custom Platform Keywords

Modify `get_system_preference()` in the script to add custom keywords.

### Integration with Scripts

```python
import subprocess
import json

result = subprocess.run([
    'python', 'skills/browser-auto-download/scripts/auto_download.py',
    '--url', 'https://example.com/download'
], capture_output=True, text=True)

if result.returncode == 0:
    data = json.loads(result.stdout)
    print(f"Downloaded: {data['path']}")  # Use the file
```

### Batch Downloads

```python
urls = [
    "https://example1.com/download",
    "https://example2.com/download",
    "https://example3.com/download"
]

for url in urls:
    result = auto_download(url)
    if result:
        print(f"Success: {result['filename']}")
```

「开发编程」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。