Intelligent file backup with compression and verification. Backup, sync, verify integrity, dedup, and restore. Manifest tracking. Zero external dependencies.
Coding
Smart Downloader
Try itSmart file downloader with multi-threading, resumable downloads, and progress display
What it does
Smart file downloader with multi-threading, resumable downloads, and progress display
The skill document
Overview
Smart file downloader with multi-threaded concurrent downloads, resumable download support, progress display, and file integrity verification.
Core Features
- Multi-threaded concurrent downloads: Use Semaphore to control concurrency, improve download speed
- Resumable downloads: Support resuming from breakpoint, avoid repeated downloads
- Progress display: Rich progress bar showing download progress, speed, remaining time
- File integrity verification: Automatically verify file integrity after download
- Custom request headers: Support custom User-Agent, Referer, etc.
- Error retry: Automatically retry failed downloads, default max 5 times
- Proxy support: Support HTTP/HTTPS/SOCKS5 proxies
- Temporary file management: Download to temporary directory, automatically move to target directory after completion
Usage
Provide a list of download URLs, and the script will automatically download all files.
Parameters
urls: List of download URLs (required, comma separated or file path)output_dir: Output directory (required)max_workers: Max concurrency (optional, default 4)chunk_size: Chunk size (optional, default 2MB)timeout: Request timeout (optional, default 10 seconds)retry: Max retry times (optional, default 5)headers: Custom request headers (optional, JSON format)proxy: Proxy address (optional)
Example
python scripts/smart_download.py urls.txt output/
python scripts/smart_download.py "https://example.com/file1.jpg,https://example.com/file2.jpg" output/
python scripts/smart_download.py urls.txt output/ --max-workers 8 --timeout 30
python scripts/smart_download.py urls.txt output/ --proxy http://127.0.0.1:7890
URL File Format
Supports two ways to provide URLs:
-
Command line comma separated:
python scripts/smart_download.py "url1,url2,url3" output/ -
File path (one URL per line):
https://example.com/file1.jpg https://example.com/file2.jpg https://example.com/file3.mp4
Output Format
- Files are saved in
output_dirdirectory - Temporary files are saved in
{output_dir}/.temp/directory - Temporary directory is automatically cleaned after download
Progress Display
During download, the following information is displayed:
- File name
- Download progress (percentage)
- Download speed (MB/s)
- Remaining time
- Downloaded/Total size
Tech Stack
- Python 3.11+
- httpx 0.28.1
- aiofiles 25.1.0
- rich 14.3.3
Performance Optimization Tips
- Concurrency: Adjust based on network and target server (recommended 4-8)
- Chunk size: For large files (>100MB), consider increasing to 4-8MB
- Timeout: For slow networks, consider increasing to 30-60 seconds
- Retry times: For unstable networks, consider increasing to 10 times
Error Handling
- Automatically retry failed downloads
- Display detailed error information
- Failed download files are logged
- Support manual cleanup and re-download
Legal Disclaimer
This skill is for learning and research purposes only.
Users must comply with the following principles when using this skill:
- Not for any commercial use
- Comply with target platform's terms of service and robots.txt rules
- Do not conduct large-scale downloads or cause operational disruption to the platform
- Reasonably control request frequency to avoid burdening the target platform
- Do not use for any illegal or improper purposes
By using this skill, you agree to comply with the above principles.
Related skills
Content-aware file management for workspace files: search (content snippets opt-in via --snippets), dedup, organize, rename, file metadata inspection, and continuous watch mode. Watch mode persists a journal (paths/hashes/sizes/ timestamps/change events) to memory/smart-files-journal.json and can monitor paths outside the workspace when --force is passed. All file mutations (organize/rename) require --force and are dry-run by default.
Download and save Perplexity.ai conversations as individual Markdown files. One thread = one .md file. Processes threads sequentially. Supports single thread, URL lists, or full history export. Triggers on "download perplexity thread", "export perplexity history", "save all perplexity threads", or any request to capture Perplexity conversations.
Sync latest audio or video (mp3/mp4) from YouTube channels to Google Drive.
智能压缩文件阅读器。直接读取zip/tar/gz/tgz/bz2/xz/7z/rar 等压缩包的内容:列出文件清单、预览内部文件内容、 提取单个文件或全部解压、搜索压缩包内文件。 支持图片压缩包直接读取显示。每次使用自动学习改进。 触发词:压缩包、zip文件、解压、tar包、读压缩文件、archive、查看压缩包。
Fetch and export WeChat public article content through down.mptext.top API. Use when testing this API, downloading a WeChat article, validating html/markdown...