Thunder Core

Other

Windows Thunder download client via COM interface — add, commit, cancel, and manage download tasks programmatically.

Install

openclaw skills install thunder-core

Thunder Download Core

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).

Quick Start

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

MethodDescription
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

FunctionDescription
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.