Control the Thunder (迅雷) download engine on Windows via COM interface. Add download tasks, set custom headers (Referer, User-Agent, Cookie), commit tasks, cancel all, and query task list.
Prerequisites: Windows OS with Thunder client installed. Python packages: pywin32 (pip install pywin32).
from thunder_core import ThunderCore, download
# Quick one-shot download
download("https://example.com/file.zip", "C:\\Downloads\\file.zip")
# Full control
tc = ThunderCore()
if tc.initialize():
tc.add_task("https://example.com/file.zip", "C:\\Downloads\\file.zip",
refer_url="https://example.com",
user_agent="Mozilla/5.0")
tc.commit_tasks()
tasks = tc.get_tasks()
tc.close()
| Method | Description |
|--------|-------------|
| initialize() | Initialize Thunder COM component |
| add_task(url, save_path, ...) | Add a download task with custom headers |
| commit_tasks() | Submit all queued tasks |
| add_and_commit(url, save_path, ...) | Add task and immediately commit |
| cancel_all() | Cancel all active tasks |
| get_tasks() | Get current task list |
| close() | Release COM resources |
| Function | Description |
|----------|-------------|
| download(url, save_path, ...) | Convenience: create, add, commit in one call |
ThunderAgent.ThunderAgent)
_install_path
thunder_core.py (155 lines) in this skill directory.
> 学习时间: 2026-06-01 20:58
> 学习时间: 2026-06-01 21:02
> 学习时间: 2026-06-02 09:22
https://www.bilibili.com/video/BV1kRVn6AEwb
https://www.bilibili.com/video/BV1pN411G7tm
https://www.bilibili.com/video/BV1tnVJ6qEK2
> 学习时间: 2026-06-02 09:35
https://www.bilibili.com/video/BV1kRVn6AEwb
https://www.bilibili.com/video/BV1pN411G7tm
https://www.bilibili.com/video/BV1tnVJ6qEK2
共 2 个版本