IDM Downloader
Use IDM (Internet Download Manager) to download large files via COM interface or command line on Windows. Recommended for large files such as datasets, videos, disk images, and archives where download resumption and acceleration are beneficial.
Quick Usage
CODEBLOCK0
Features
- 1. COM Interface (Primary): Uses IDM's COM automation (
IDMan.CIDWMControl.1) for reliable downloads - Command Line Fallback: Uses
IDMan.exe with /n flag for immediate download - Registry Search: Finds IDM installation from Windows Registry if not at default paths
- Auto Filename: Extracts filename from URL if not specified
IDM Command Line
IDMan.exe parameters:
- -
/d <URL> - URL to download - INLINECODE4 - Local directory to save file
- INLINECODE5 - Filename to save as
- INLINECODE6 - Start download immediately (no prompt)
Requirements
System Requirements
- - OS: Windows (IDM is a Windows-only application)
- IDM: Internet Download Manager installed on the system
Python Dependencies
| Dependency | Purpose | Install Command |
|---|
| Python 3.x | Runtime | - |
| pywin32 |
COM interface & registry access |
pip install pywin32 |
| win32com.client | IDM COM automation | (included in pywin32) |
| pythoncom | COM initialization | (included in pywin32) |
| winreg | Windows Registry access | (built-in, Windows only) |
Note: pywin32 is optional but recommended for better compatibility and COM interface support. The script will fall back to command-line mode if not installed.
Notes
- - IDM must be installed on the system
- If COM fails, automatically falls back to command line
- Downloads start immediately with
/n flag
IDM 下载器
使用 IDM(Internet Download Manager)通过 COM 接口或命令行在 Windows 上下载大文件。推荐用于数据集、视频、磁盘映像和存档等大文件,这些文件支持断点续传和加速下载。
快速使用
bash
将文件下载到指定目录
python scripts/download_idm.py
[输出目录] [文件名]
下载到当前目录
python scripts/download_idm.py
使用自定义文件名下载
python scripts/download_idm.py <输出目录> <自定义文件名>
功能特性
- 1. COM 接口(主要方式):使用 IDM 的 COM 自动化(IDMan.CIDWMControl.1)实现可靠下载
- 命令行回退:使用带 /n 标志的 IDMan.exe 进行即时下载
- 注册表搜索:如果 IDM 不在默认路径,则从 Windows 注册表中查找安装位置
- 自动文件名:如果未指定文件名,则从 URL 中提取
IDM 命令行
IDMan.exe 参数:
- - /d - 要下载的 URL
- /p <路径> - 保存文件的本地目录
- /f <文件名> - 保存为的文件名
- /n - 立即开始下载(无提示)
系统要求
系统需求
- - 操作系统:Windows(IDM 仅适用于 Windows)
- IDM:系统中已安装 Internet Download Manager
Python 依赖
| 依赖项 | 用途 | 安装命令 |
|---|
| Python 3.x | 运行环境 | - |
| pywin32 |
COM 接口和注册表访问 | pip install pywin32 |
| win32com.client | IDM COM 自动化 | (包含在 pywin32 中) |
| pythoncom | COM 初始化 | (包含在 pywin32 中) |
| winreg | Windows 注册表访问 | (内置,仅限 Windows) |
注意:pywin32 是可选的,但建议安装以获得更好的兼容性和 COM 接口支持。如果未安装,脚本将回退到命令行模式。
注意事项
- - 系统中必须安装 IDM
- 如果 COM 失败,会自动回退到命令行模式
- 使用 /n 标志立即开始下载