Browser Auto Download v4.1.0 (Enhanced)
Download files from dynamic webpages with intelligent detection and multi-step navigation.
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)
CODEBLOCK0
The script will:
- 1. Check for auto-downloads on page load
- Look for platform-specific page links (PC/Desktop version)
- Navigate if needed
- Try clicking download buttons as fallback
Option 2: Built-in Shortcuts
CODEBLOCK1
Option 3: Python Module
CODEBLOCK2
How It Works
Three-Stage Strategy
Stage 1: Auto-Download Detection
CODEBLOCK3
Stage 2: Multi-Step Navigation
CODEBLOCK4
Stage 3: Button Clicking
CODEBLOCK5
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, 电脑, 桌面, INLINECODE9
Examples
Auto-Download Sites (Best Case)
CODEBLOCK6
Multi-Step Navigation
CODEBLOCK7
Manual Selector (Fallback)
CODEBLOCK8
Disable Features
CODEBLOCK9
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 INLINECODE14 - Verify the site offers multiple versions
Navigation going to wrong page:
- - Disable with INLINECODE15
- 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)
CODEBLOCK10
stdout (JSON result)
CODEBLOCK11
Real-World Examples
Meitu Xiuxiu (Multi-step + Auto-download)
CODEBLOCK12
WeChat DevTools (Button click)
CODEBLOCK13
Generic Software (Mixed)
CODEBLOCK14
Requirements
CODEBLOCK15
Advanced Usage
Custom Platform Keywords
Modify get_system_preference() in the script to add custom keywords.
Integration with Scripts
CODEBLOCK16
Batch Downloads
CODEBLOCK17
浏览器自动下载 v4.1.0(增强版)
通过智能检测和多步导航从动态网页下载文件。
主要功能
- - 自动下载捕获:检测页面加载时自动触发的下载
- 多步导航:查找并导航至特定平台页面(PC/桌面版)
- 平台自动检测:Windows x64/ARM64、macOS Intel/Apple Silicon、Linux
- 事件监听:捕获所有下载事件,无需点击按钮
- 智能回退:尝试多种策略(自动下载、导航、点击)
使用场景
使用此技能的场景:
- - 自动下载网站:页面加载时自动开始下载
- 多步流程:首页 - 点击PC版 - 下载页面
- 动态内容:通过JavaScript生成的下载链接
- 交互式下载:需要点击按钮或导航UI
不适用于:直接文件URL(请使用curl/wget)
快速开始
选项1:自动模式(推荐)
bash
python skills/browser-auto-download/scripts/auto_download.py \
--url https://example.com/download
脚本将:
- 1. 检查页面加载时的自动下载
- 查找特定平台页面链接(PC/桌面版)
- 必要时进行导航
- 尝试点击下载按钮作为回退方案
选项2:内置快捷方式
bash
微信开发者工具
python skills/browser-auto-download/scripts/auto_download.py --wechat
美图秀秀
python skills/browser-auto-download/scripts/auto_download.py --meitu
选项3:Python模块
python
from skills.browser-auto-download.scripts.autodownload import autodownload
result = auto_download(
url=https://example.com/download,
auto_select=True, # 平台检测
auto_navigate=True # 多步导航
)
if result:
print(f已下载: {result[path]})
工作原理
三阶段策略
阶段1:自动下载检测
页面加载 - 检查下载 - 成功?
是: 否:
保存文件 进入阶段2
阶段2:多步导航
查找PC/桌面链接 - 导航 - 检查下载 - 成功?
是: 否:
保存文件 进入阶段3
阶段3:按钮点击
尝试多个选择器 - 点击 - 等待下载 - 保存
特定平台页面检测
自动查找类似链接:
- - meitu for PC - pc.meitu.com
- Desktop version - desktop.example.com
- Windows Download - windows.example.com
关键词:pc、desktop、windows、mac、download、电脑、桌面、客户端
示例
自动下载网站(最佳情况)
bash
页面加载时触发下载的网站
python skills/browser-auto-download/scripts/auto_download.py \
--url https://pc.meitu.com/en/pc?download=pc
多步导航
bash
首页 - PC版 - 下载
python skills/browser-auto-download/scripts/auto_download.py \
--url https://xiuxiu.meitu.com/ \
--auto-navigate # 启用(默认:True)
手动选择器(回退方案)
bash
如果自动检测失败
python skills/browser-auto-download/scripts/auto_download.py \
--url https://example.com/download \
--selector button:has-text(Download for free)
禁用功能
bash
不导航到平台页面
python skills/browser-auto-download/scripts/auto_download.py \
--url https://example.com \
--no-auto-navigate
不检测平台
python skills/browser-auto-download/scripts/auto_download.py \
--url https://example.com \
--no-auto-select
平台检测
| 系统 | 架构 | 使用的关键词 |
|---|
| 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 |
故障排除
下载未开始:
- - 使用--headless(默认:False)观察过程
- 检查stderr中的自动下载消息
- 如果导航导致问题,尝试--no-auto-navigate
- 使用--selector手动指定按钮
下载了错误版本:
- - 检查stderr输出中的平台检测
- 使用--no-auto-select并手动指定--selector
- 确认网站提供多个版本
导航到错误页面:
- - 使用--no-auto-navigate禁用
- 网站可能没有特定平台页面
文件未保存:
- - 检查输出目录的写入权限
- 确保有足够的磁盘空间
- 等待大文件(最多3分钟)
输出格式
stderr(进度)
启动浏览器(可见)...
打开:https://example.com
检查自动下载...
检查特定平台页面链接...
找到平台页面:https://pc.example.com
导航到平台页面...
检测到下载:softwarev2.1.0win64.exe
保存:softwarev2.1.0win64.exe
成功!
文件:C:\Users\User\Downloads\softwarev2.1.0win64.exe
大小:231.9 MB
stdout(JSON结果)
json
{
path: C:\\Users\\User\\Downloads\\software
v2.1.0win64.exe,
filename: software
v2.1.0win64.exe,
size_bytes: 243209941,
size_mb: 231.9,
platform: Windows AMD64
}
实际示例
美图秀秀(多步 + 自动下载)
python
from autodownload import quickdownload_meitu
result = quickdownloadmeitu()
流程:首页 - PC页面链接 - 导航 - 自动下载
微信开发者工具(按钮点击)
python
from autodownload import quickdownloadwechatdevtools
result = quickdownloadwechat_devtools()
流程:首页 - 点击稳定版Windows 64 - 下载
通用软件(混合)
python
result = auto_download(
url=https://example.com/downloads,
auto_select=True, # 检测Windows 64位
auto_navigate=True # 查找桌面版链接
)
要求
bash
pip install playwright
playwright install chromium
高级用法
自定义平台关键词
修改脚本中的getsystempreference()以添加自定义关键词。
与脚本集成
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已下载: {data[path]}) # 使用文件
批量下载
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成功: {result[filename]})