video-fetch-download
中文简介: 视频与种子下载神器,支持:①按片名搜索磁力链并一键提交115离线下载(magnet_search.py,支持中文片名自动转换,基于Knaben API + apibay双源);②磁力链/种子URL通过115网盘离线下载(服务器端,不占本机带宽);③夸克网盘磁力/URL离线下载;④夸克网盘分享链接一键转存;⑤YouTube/Bilibili/Twitter等1000+网站视频通过yt-dlp下载并上传至网盘,支持Google Drive、OneDrive、Dropbox等40+云存储。一键安装脚本(含SHA256校验),115支持扫码登录,夸克需手动提取一次Cookie(有效期数月)。
⚠️ 夸克说明: 夸克网盘未开放扫码登录API,首次使用需从浏览器手动复制Cookie,操作约1分钟,之后数月内无需重复。
Download videos and torrents directly to cloud storage. Five input modes:
| Input | Tool | Destination | Bandwidth |
|---|
| Magnet / Torrent URL | 115 offline API | 115 Pan | Zero (server-side) |
| Magnet / URL |
quark_offline.py | Quark Pan | Zero (server-side) |
| Quark share link | quark_save.py | Quark Pan | Zero (server-side) |
| Video URL (YT/Bili/etc.) | yt-dlp + rclone | 115 Pan | Local download |
| Local .torrent file | aria2c + rclone | 115 Pan | Local download |
Installation
Run the one-command installer. It detects your OS/arch and installs all dependencies:
CODEBLOCK0
Installs: yt-dlp, rclone (115-patched build), aria2, python3.12, INLINECODE5
All binaries are verified with SHA256 checksums before installation.
Authentication
115 Pan — QR code login (recommended, TV mode)
TV mode does not compete with your phone/browser sessions:
CODEBLOCK1
Re-login when cookie expires: INLINECODE6
Quark Pan — Cookie (manual, one-time setup)
⚠️ Note: Quark does not provide a public QR code login API.
Authentication requires manually extracting a browser Cookie.
The cookie is valid for several months and only needs to be set once.
Steps:
- 1. Open https://pan.quark.cn in a browser and log in
- Press F12 → Network tab → Refresh the page
- Click any request → Request Headers → Copy the
cookie field - Run the setup wizard:
CODEBLOCK2
Usage
Search & submit to 115 (v1.1.3)
CODEBLOCK3
Supports Chinese titles (auto-mapped to English for search). Powered by Knaben API (primary) + apibay/TPB (fallback). Use --source both to merge results from both sources.
Magnet link / Torrent URL → 115 offline download
CODEBLOCK4
Magnet link / URL → Quark offline download
CODEBLOCK5
Quark share link → transfer to Quark Pan
CODEBLOCK6
Video URL → download and upload to 115
CODEBLOCK7
Local .torrent file → aria2c download and upload
CODEBLOCK8
Environment Variables
| Variable | Default | Description |
|---|
| INLINECODE9 | INLINECODE10 | rclone remote:path for uploads |
| INLINECODE11 |
/tmp/video-fetch | local staging directory |
Supported Sites
All sites supported by yt-dlp: YouTube, Bilibili, Twitter/X, Instagram, TikTok, Vimeo, and 1000+ more.
CODEBLOCK9
Other Cloud Storage
The skill uses rclone for uploads, which supports 40+ cloud storage providers. Any rclone-compatible remote works as a destination.
Supported providers (examples)
| Provider | rclone backend | Auth method | Notes |
|---|
| Google Drive | INLINECODE13 | OAuth (browser link) | 15 GB free |
| Microsoft OneDrive |
onedrive | OAuth (browser link) | Included with Microsoft 365 |
| Dropbox |
dropbox | OAuth (browser link) | 2 GB free |
| PikPak |
pikpak | OAuth (browser link) | Also supports server-side offline download |
| pCloud |
pcloud | OAuth (browser link) | 10 GB free, Europe-based |
| Proton Drive |
protondrive | Username + password + 2FA | Privacy-focused |
| Mega |
mega | Username + password | 20 GB free, end-to-end encrypted |
| Backblaze B2 |
b2 | API key | Low-cost object storage |
| Amazon S3 |
s3 | API key | And 20+ S3-compatible providers |
| Any WebDAV |
webdav | Username + password | Nextcloud, Owncloud, etc. |
| SFTP |
sftp | SSH key or password | Any SSH server |
Setup (one-time) — Recommended method
The easiest way to connect Google Drive (or any OAuth provider) to a headless server is to authorize on your local machine first, then copy the token to the server.
Step 1 — On your local machine, install rclone:
CODEBLOCK10
Step 2 — Run the authorization wizard locally:
CODEBLOCK11
Step 3 — Copy the token to your server.
On your local machine, find the token:
CODEBLOCK12
On your server, append it to rclone config:
CODEBLOCK13
Step 4 — Verify:
CODEBLOCK14
Once configured, use it as your download destination:
CODEBLOCK15
Usage
CODEBLOCK16
Note: Downloads via yt-dlp use local bandwidth (file downloads to server first, then uploads to cloud). This differs from 115/Quark offline download which is server-side with zero local bandwidth.
Re-authentication
| Service | Command |
|---|
| 115 Pan | INLINECODE24 |
| Quark Pan |
python3 scripts/quark_login.py |
Security
Binary installation
- -
yt-dlp is downloaded from the official yt-dlp/yt-dlp repository and verified against the official SHA2-256SUMS file before installation. Installation is aborted if verification fails. - INLINECODE28 115-fork is downloaded from gaoyb7/rclone-release (a fork with 115 Pan backend support) with pinned SHA256 checksums for all supported architectures. Installation is aborted if verification fails.
- The rclone 115-fork is installed to
~/.local/bin/rclone (user directory only). It does not replace or modify any system-level rclone installation.
Credential handling
- - 115 Pan credentials are obtained via QR code scan (TV mode) and written directly to the rclone config file (
chmod 600). They are never passed as command-line arguments and are not visible in the process list (ps aux). - Quark Pan cookie is manually extracted by the user from their own browser and stored at
~/.config/video-fetch/quark_cookie.txt (chmod 600). - All credentials are stored locally only and are never transmitted to any third party. They are only used to authenticate with the respective cloud service APIs (115 Pan, Quark Pan).
Other
- -
video_fetch.sh does not use --js-runtimes node (no arbitrary JS execution via yt-dlp) - Torrent search uses public APIs only (Knaben, apibay) — no credentials required
Verified
- - 115 offline download (magnet → 115 server) ✅
- 115 rclone direct access ✅
- Quark offline download (magnet → Quark server) ✅
- Quark share transfer ✅
- yt-dlp + rclone upload pipeline ✅
- aria2c torrent download ✅
- One-command installer (with SHA256 verification) ✅
- Dual search source: Knaben + apibay ✅
- Chinese title auto-mapping ✅
video-fetch-download
中文简介: 视频与种子下载神器,支持:①按片名搜索磁力链并一键提交115离线下载(magnet_search.py,支持中文片名自动转换,基于Knaben API + apibay双源);②磁力链/种子URL通过115网盘离线下载(服务器端,不占本机带宽);③夸克网盘磁力/URL离线下载;④夸克网盘分享链接一键转存;⑤YouTube/Bilibili/Twitter等1000+网站视频通过yt-dlp下载并上传至网盘,支持Google Drive、OneDrive、Dropbox等40+云存储。一键安装脚本(含SHA256校验),115支持扫码登录,夸克需手动提取一次Cookie(有效期数月)。
⚠️ 夸克说明: 夸克网盘未开放扫码登录API,首次使用需从浏览器手动复制Cookie,操作约1分钟,之后数月内无需重复。
将视频和种子直接下载到云存储。五种输入模式:
| 输入 | 工具 | 目标 | 带宽 |
|---|
| 磁力链/种子URL | 115离线API | 115网盘 | 零(服务器端) |
| 磁力链/URL |
quark_offline.py | 夸克网盘 | 零(服务器端) |
| 夸克分享链接 | quark_save.py | 夸克网盘 | 零(服务器端) |
| 视频URL(YT/Bili等) | yt-dlp + rclone | 115网盘 | 本地下载 |
| 本地.torrent文件 | aria2c + rclone | 115网盘 | 本地下载 |
安装
运行一键安装脚本。它会检测你的操作系统/架构并安装所有依赖:
bash
bash scripts/install.sh
安装内容:yt-dlp、rclone(115专用构建版)、aria2、python3.12、p115client
所有二进制文件在安装前都会通过SHA256校验和进行验证。
身份验证
115网盘 — 二维码登录(推荐,电视模式)
电视模式不会与你的手机/浏览器会话冲突:
bash
python3 scripts/115_qrlogin.py
使用115 App扫描二维码 → 确认 → 完成
凭证安全保存至rclone配置(chmod 600)
Cookie过期后重新登录:python3 scripts/115_qrlogin.py
夸克网盘 — Cookie(手动,一次性设置)
⚠️ 注意: 夸克未提供公开的二维码登录API。
身份验证需要手动从浏览器提取Cookie。
Cookie有效期为数月,仅需设置一次。
步骤:
- 1. 在浏览器中打开https://pan.quark.cn并登录
- 按F12 → 网络标签 → 刷新页面
- 点击任意请求 → 请求头 → 复制cookie字段
- 运行设置向导:
bash
python3 scripts/quark_login.py
按提示粘贴你的Cookie
保存至~/.config/video-fetch/quark_cookie.txt(chmod 600)
使用方法
搜索并提交至115(v1.1.3)
bash
仅搜索(Knaben API,自动回退至apibay)
python3 scripts/magnet_search.py 电影名
搜索并自动将最佳结果提交至115
python3 scripts/magnet_search.py 电影名 --submit
提交指定结果(例如第2个)
python3 scripts/magnet_search.py 电影名 --submit --index 2
仅使用apibay
python3 scripts/magnet_search.py Movie Name --source apibay
合并两个来源的结果
python3 scripts/magnet_search.py Movie Name --source both
支持中文片名(自动映射为英文进行搜索)。由Knaben API(主要)+ apibay/TPB(备用)提供支持。使用--source both合并两个来源的结果。
磁力链/种子URL → 115离线下载
bash
python3.12 scripts/115_offline.py magnet:?xt=urn:btih:...
python3.12 scripts/115_offline.py https://example.com/file.torrent
python3.12 scripts/115_offline.py --list # 检查任务状态
磁力链/URL → 夸克离线下载
bash
python3 scripts/quark_offline.py magnet:?xt=urn:btih:...
python3 scripts/quark_offline.py https://example.com/file.torrent
python3 scripts/quark_offline.py --list # 检查任务状态
python3 scripts/quark_offline.py --login # 显示Cookie设置说明
夸克分享链接 → 转存至夸克网盘
bash
python3 scripts/quark_save.py https://pan.quark.cn/s/xxxxxxxx
python3 scripts/quark_save.py https://pan.quark.cn/s/xxxxxxxx /MyFolder
python3 scripts/quark_save.py --list # 列出夸克网盘根目录
视频URL → 下载并上传至115
bash
VIDEOFETCHREMOTE=115drive:云下载 bash scripts/videofetch.sh https://youtube.com/watch?v=...
本地.torrent文件 → aria2c下载并上传
bash
bash scripts/video_fetch.sh /path/to/file.torrent 115drive:云下载
环境变量
| 变量 | 默认值 | 描述 |
|---|
| VIDEOFETCHREMOTE | 115drive:云下载 | rclone远程路径,用于上传 |
| VIDEOFETCHTMPDIR |
/tmp/video-fetch | 本地临时目录 |
支持的网站
yt-dlp支持的所有网站:YouTube、Bilibili、Twitter/X、Instagram、TikTok、Vimeo等1000+网站。
bash
yt-dlp --list-extractors | grep -i
其他云存储
该技能使用rclone进行上传,支持40+云存储提供商。任何兼容rclone的远程存储均可作为目标。
支持的提供商(示例)
| 提供商 | rclone后端 | 认证方式 | 备注 |
|---|
| Google Drive | drive | OAuth(浏览器链接) | 15 GB免费 |
| Microsoft OneDrive |
onedrive | OAuth(浏览器链接) | 随Microsoft 365提供 |
| Dropbox | dropbox | OAuth(浏览器链接) | 2 GB免费 |
| PikPak | pikpak | OAuth(浏览器链接) | 也支持服务端离线下载 |
| pCloud | pcloud | OAuth(浏览器链接) | 10 GB免费,欧洲服务器 |
| Proton Drive | protondrive | 用户名+密码+2FA | 注重隐私 |
| Mega | mega | 用户名+密码 | 20 GB免费,端到端加密 |
| Backblaze B2 | b2 | API密钥 | 低成本对象存储 |
| Amazon S3 | s3 | API密钥 | 以及20+兼容S3的提供商 |
| 任意WebDAV | webdav | 用户名+密码 | Nextcloud、Owncloud等 |
| SFTP | sftp | SSH密钥或密码 | 任意SSH服务器 |
设置(一次性)— 推荐方法
将Google Drive(或任意OAuth提供商)连接到无头服务器的最简单方法是先在本地机器上授权,然后将令牌复制到服务器。
步骤1 — 在本地机器上,安装rclone:
bash
macOS
brew install rclone
Windows:从https://rclone.org/install/下载
Linux
curl https://rclone.org/install.sh | sudo bash
步骤2 — 在本地运行授权向导:
bash
rclone config
→ n(新建远程)
→ 命名为:gdrive
→ type:drive(Google Drive)
→ 留空clientid和clientsecret(按回车)
→ scope:1(完全访问)
→ 浏览器会自动打开 → 登录 → 允许访问
→ y(使用自动配置)
→ n(不是团队盘,除非你需要)
→ q(退出)
步骤3 — 将令牌复制到服务器。
在本地机器上,找到令牌:
bash
cat ~/.config/rclone/rclone.conf
找到[gdrive]部分 — 复制整个区块
在服务器上,将其追加到rclone配置:
bash
cat >> ~/.config/rclone/rclone.conf << EOF
[gdrive]
type = drive
token = {accesstoken:...,tokentype:Bearer,...