Windows Thunder download client via COM interface — add, commit, cancel, and manage download tasks programmatically.
---
name: thunder-core
description: Windows Thunder download client via COM interface — add, commit, cancel, and manage download tasks programmatically.
version: 1.0.0
tags:
- download
- thunder
- xunlei
- windows
- com
- automation
category: "Automation"
os:
- windows
metadata:
openclaw:
requires:
bins:
- python
emoji: ⚡
---
# Thunder Download Core
Control the [Thunder (迅雷)](https://www.xunlei.com/) 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`).
## Quick Start
```python
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()
```
## API
### ThunderCore
| 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 |
### Utility
| Function | Description |
|----------|-------------|
| `download(url, save_path, ...)` | Convenience: create, add, commit in one call |
## Notes
- Windows-only (uses COM interface `ThunderAgent.ThunderAgent`)
- Thunder must be installed at default path or custom `_install_path`
- Run as administrator if COM registration fails
## Source
`thunder_core.py` (155 lines) in this skill directory.
don't have the plugin yet? install it then click "run inline in claude" again.