📚 简述
node-thunder
, 对Js SDK进行简单封装,可以实现迅雷对单个文件或批量文件下载文件,系统需要浏览器有迅雷插件和迅雷11(版本要求可查看 迅雷下载 JS-SDK 指南 )
📦 安装
$ npm i --save node-thunder
🔨 使用
import {
ThunderJsSdk } from 'node-thunder'
const opt = {
downloadDir: '下载目录',
tasks: [{
name: 'ThunderVIP', // 下载文件名
url: 'http://down.sandai.net/ThunderVIP/ThunderVIP-xlgw.exe' // 下载资源链接
}]
}
// port 服务端口号, 可选, 默认 9099
// closeTime 服务启动到关闭的时间, 可选, 默认 9000ms