#
JavDB 2026-06-12

JavDB 年度 TOP250 视频批量下载

By io 114 Views 8 MIN READ 0 Comments
javdb_movies_yearly_final.xlsx 提取磁力链接,批量提交到 qBittorrent 下载。

数据集

  • 来源: JavDB 2015–2025 年度 TOP250 榜单合集
  • 文件: javdb_movies_yearly_final.xlsx
  • 下载: 夸克网盘
  • 提取结果: 2,688 个磁力链接(去重后)

一、提取磁力链接(Windows/Python)

依赖

pip install openpyxl

脚本:extract_magnets.py

#!/usr/bin/env python3
"""提取 Excel 中所有磁力链接"""
import re, sys
from pathlib import Path
try:
    import openpyxl
except ImportError:
    print("openpyxl not installed. Installing...")
    import subprocess
    subprocess.check_call([sys.executable, "-m", "pip", "install", "openpyxl"])
    import openpyxl

xlsx = Path(r"C:\Users\io\Downloads\javdb_movies_yearly_final.xlsx")
if not xlsx.exists():
    print(f"❌ 文件不存在: {xlsx}")
    sys.exit(1)

wb = openpyxl.load_workbook(xlsx, read_only=True, data_only=True)
magnet_pat = re.compile(r'magnet:\?xt=urn:btih:[a-zA-Z0-9]+', re.IGNORECASE)
found = set()

for sheet_name in wb.sheetnames:
    ws = wb[sheet_name]
    for row in ws.iter_rows(values_only=True):
        for cell in row:
            if cell and isinstance(cell, str):
                for m in magnet_pat.finditer(cell):
                    found.add(m.group())

wb.close()

if not found:
    print("❌ 未找到任何磁力链接")
    sys.exit(0)

print(f"✅ 共找到 {len(found)} 个磁力链接:\n")
for i, link in enumerate(sorted(found), 1):
    print(f"{i:>4}. {link}")

# 写一份到 txt
out = xlsx.with_name("magnets_output.txt")
out.write_text("\n".join(sorted(found)), encoding="utf-8")
print(f"\n📁 已保存到: {out}")

运行

python extract_magnets.py
  • ✅ 输出:magnets_output.txt(每个磁力链接一行)
  • ✅ 文件位置:与 xlsx 同目录

二、上传到服务器

将生成的 magnets_output.txt 上传到服务器 /tmp/ 目录:


三、调用qBittorrent api 传入磁力链接

⚠️ 请将下方的 用户名密码 替换为你的 qBittorrent WebUI 凭据。
USER="admin"
PASS="your_password_here"
HOST="http://你的服务器IP:8181"

while IFS= read -r link; do
  [[ "$link" =~ magnet: ]] || continue
  curl -s -X POST -u "$user:$PASS" \
    --data-urlencode "urls=$link" \
    --data-urlencode "savepath=/downloads/" \
    "$HOST/api/v2/torrents/add"
done < /tmp/magnets_output.txt

四、qBittorrent 配置参考

项目
部署方式Docker(linuxserver/qbittorrent)
管理面板1Panel
WebUI 端口8181
配置目录/opt/1panel/apps/qbittorrent/qbittorrent/config/
下载目录/mnt/mydisk
LocalHostAuthfalse(已关闭,允许 localhost 免密 API)

本文由 io 原创

采用 CC BY-NC-SA 4.0 协议进行许可

转载请注明出处:https://godd.asia/index.php/archives/34/

TAGS: JavDB

相关推荐

  • 暂无相关推荐,看看别的吧。

0 评论

发表评论