MCPInstall

douyin-batch-download

抖音视频批量下载工具 - 基于 F2 框架实现高效、增量的视频下载功能。支持单个/批量博主下载,自动 Cookie 管理,差量更新机制。本技能应在用户需要批量下载特定博主视频、服务器部署自动化下载、或定期更新视频库时使用。

Installs
615
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/cat-xierluo/legal-skills --skill douyin-batch-download
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads douyin-batch-download automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

抖音视频批量下载

本技能基于 F2 框架实现抖音视频批量下载,提供高效、稳定的批量下载能力。

功能概述

  • 单个博主下载 - 输入主页链接或 ID,下载全部或指定数量
  • 批量下载 - 一次指定多个博主,批量处理
  • 增量下载 - 自动跳过已下载的视频(按 aweme_id 判断)
  • Cookie 管理 - 优先从浏览器自动读取,失败则提示手动配置
  • 关注列表管理 - 维护 following.json 记录已处理的博主
  • 差量更新 - 支持只下载主页有但本地没有的视频
  • 博主昵称文件夹 - 使用博主昵称作为文件夹名,更易识别
  • 自定义下载路径 - 支持自定义下载目录,默认使用系统 Downloads 目录
  • 视频压缩 - 使用 ffmpeg 压缩视频,节省存储空间
  • 视频元数据 - 抓取并保存视频统计数据(点赞、评论、收藏、分享数)
  • 数据可视化 - Web 界面展示博主和视频的统计信息,支持排序和筛选

使用场景

  • 服务器批量下载:部署在专用服务器上,定时批量抓取特定博主视频
  • 定期更新视频库:自动检测新视频,只下载缺失部分
  • 备份与迁移:视频文件分类存储,便于备份和后续处理
  • 内容分析:基于视频统计数据(点赞、评论、收藏)进行博主内容分析

配置说明

下载路径配置

在 config/config.yaml 中配置下载路径:

# 下载路径配置
# 留空则使用系统 Downloads 目录下的 "抖音视频下载" 子目录
# macOS: ~/Downloads/抖音视频下载
# Windows: C:\Users\<用户名>\Downloads\抖音视频下载
download_path: ""

# 自定义路径示例:
# download_path: "/Users/maoking/Movies/抖音"
# download_path: "D:\\Videos\\抖音"

文件夹命名

视频文件按博主昵称分类存储,例如:

~/Downloads/抖音视频下载/
├── 博主A/
│   ├── 2024-01-01_视频标题_xxx.mp4
│   └── ...
├── 博主B/
│   └── ...
└── data.js          # Web 界面数据

视频元数据

下载视频时,系统会自动提取并保存以下数据:

字段说明
aweme_id视频唯一 ID
uid作者 UID
nickname博主昵称
desc视频描述/文案
create_time发布时间
duration视频时长
digg_count点赞数
comment_count评论数
collect_count收藏数
share_count分享数

数据存储在 douyin_users.db 的 video_metadata 表中。

手动提取/更新元数据

# 扫描本地视频并提取元数据(基本信息)
python scripts/extract-metadata.py

# 查看统计摘要
python scripts/extract-metadata.py --stats

⚠️ 注意: --fetch 选项已废弃。推荐使用 download-v2.py 重新下载视频,会自动保存统计数据。

快速开始

# 创建配置
mkdir -p config
cp config/config.yaml.example config/config.yaml

# 编辑配置(填写 Cookie)
${EDITOR:-nano} config/config.yaml

# 单个下载(推荐)
python scripts/download-v2.py "https://www.douyin.com/user/MS4wLjABAAAA..."

# 批量下载
python scripts/batch-download.py --all

# 交互式选择博主下载
python scripts/batch-download.py

# 采样下载(每个博主1个视频,快速更新数据)
python scripts/batch-download.py --sample

# 生成 Web 界面数据
python scripts/generate-data.py

# 查看 Web 界面
open ~/Downloads/抖音视频下载/index.html

推荐工作流

1. 添加博主 → python scripts/manage-following.py --batch
2. 批量下载 → python scripts/batch-download.py --all
3. 查看数据 → open ~/Downloads/抖音视频下载/index.html

下载时自动保存:

  • ✅ 视频文件
  • ✅ 点赞、评论、收藏、分享数
  • ✅ 视频描述、发布时间、时长

目录结构

skills/douyin-batch-download/
├── SKILL.md                  # 本文件
├── references/
│   ├── INSTALLATION.md        # 详细安装依赖说明
│   └── USAGE.md              # 详细使用说明
├── scripts/
│   ├── utils/                # 工具模块
│   │   └── config.py         # 统一配置加载
│   ├── download-v2.py        # ✅ 推荐下载脚本(自动保存统计数据)
│   ├── batch-download.py     # 批量下载入口
│   ├── download.py           # ⚠️ 旧版下载脚本(已废弃)
│   ├── manage-following.py   # 关注列表管理(添加/删除/搜索)
│   ├── sync-following.py     # 从 F2 数据库同步 following.json
│   ├── compress.py           # 视频压缩脚本
│   ├── extract-metadata.py   # 视频元数据提取
│   ├── generate-data.py      # 生成 Web 界面数据文件
│   ├── following.py          # following.json 操作库
│   └── login.py              # 扫码登录脚本
├── config/
│   ├── config.yaml.example  # 配置模板
│   └── following.json       # 关注列表(已下载的博主)
└── douyin_users.db          # SQLite 数据库(用户信息 + 视频元数据)

依赖

系统依赖

依赖安装方式
Chrome/Chromium下载地址
ffmpegmacOS: brew install ffmpeg / Ubuntu: sudo apt install ffmpeg

ffmpeg 用于视频压缩功能,如仅需下载功能可不安装。

Python 包

包名用途
f2抖音视频下载框架
playwright浏览器自动化(扫码登录)
pyyamlYAML 配置文件解析
httpx异步 HTTP 客户端
aiofiles异步文件操作

详细安装说明:见 references/INSTALLATION.md

详细使用说明:见 references/USAGE.md

参考资源

与其他技能配合

本地 ASR 语音转文字

下载的视频可以使用 local-asr 技能将视频转录为带时间戳的 Markdown 文件。

配合方式:先使用抖音下载技能获取视频,再使用 local-asr 技能进行转录。两个技能独立运行,可根据需要灵活组合使用。

FAQ

What does the douyin-batch-download skill do?

抖音视频批量下载工具 - 基于 F2 框架实现高效、增量的视频下载功能。支持单个/批量博主下载,自动 Cookie 管理,差量更新机制。本技能应在用户需要批量下载特定博主视频、服务器部署自动化下载、或定期更新视频库时使用。

How do I install douyin-batch-download?

Run npx skills add https://github.com/cat-xierluo/legal-skills --skill douyin-batch-download in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/douyin-batch-download/ (personal) or .claude/skills/douyin-batch-download/ (project).

Which AI agents can use douyin-batch-download?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is douyin-batch-download safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains douyin-batch-download?

It is published by cat-xierluo in cat-xierluo/legal-skills. It has 615 recorded installs.

More from cat-xierluo/legal-skills

View all →

multi-search

cat-xierluo/legal-skills

智能多主题深度研究工具,支持任意材料输入,使用独立研究 Agent进行并行深度检索并生成系统化研究文档。本技能应在用户需要深度研究多个相关课题、进行系统性信息检索、整合多角度分析时使用。

Business & Finance719 installs

litigation-analysis

cat-xierluo/legal-skills

Open the skill to read its SKILL.md instructions.

Business & Finance349 installs

md2word

cat-xierluo/legal-skills

Open the skill to read its SKILL.md instructions.

Business & Finance261 installs

funasr-transcribe

cat-xierluo/legal-skills

Open the skill to read its SKILL.md instructions.

Business & Finance232 installs

legal-proposal-generator

cat-xierluo/legal-skills

Open the skill to read its SKILL.md instructions.

Business & Finance183 installs

legal-text-format

cat-xierluo/legal-skills

Open the skill to read its SKILL.md instructions.

Business & Finance158 installs

Popular business & finance skills

View category →

sales-enablement

coreyhaines31/marketingskills

When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'battle card,' 'battlecard,' 'competitive one-pager,' 'win-loss analysis,' 'why are we losing deals,' 'loss reasons,' 'how do I respond to this objection,' 'prospect just said,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps,' 'cold call script,' or 'voicemail script.' Use this for any document or asset that helps a sales team close deals. For public competitor comparison pages, see competitors. For running buyer interviews or churn research, see customer-research. For marketing website copy, see copywriting. For cold outreach emails, see cold-email. For the offer being sold (bonuses, guarantees, pricing structure),

Business & Finance119.5K installs

revops

coreyhaines31/marketingskills

When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'outbound pipeline stages,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see emails. For pricing decisions, see pricing.

Business & Finance114.1K installs

sales-funnel-blueprint

autonnel/autonnel-skills

Turn an offer into a concrete multi-step sales funnel spec - page-by-page structure, price ladder, copy outline and the metrics each step must hit. Use when asked to build a sales funnel, marketing funnel, landing page flow, lead magnet funnel, webinar funnel, tripwire or VSL funnel, when planning a product launch page flow, or when someone asks "what pages do I need" for selling something online.

Business & Finance104.5K installs

pricing

coreyhaines31/marketingskills

When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' 'should I offer a free plan,' 'pricing page teardown,' 'pricing page audit,' 'is my pricing page AI-readable,' or 'can AI read my pricing.' Use this whenever someone is figuring out what to charge, how to structure their plans, or wants to audit a pricing page (for humans and for the AI agents that shortlist tools). For in-app upgrade screens, see paywalls. For offer construction (bonuses, guarantees, value framing, naming) on services/courses/coaching/high-ticket B2B, see offers.

Business & Finance80K installs

cross-border-ecommerce

nexscope-ai/ecommerce-skills

Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.

Business & Finance62.9K installs

pricing-strategy

coreyhaines31/marketingskills

When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' or 'should I offer a free plan.' Use this whenever someone is figuring out what to charge or how to structure their plans. For in-app upgrade screens, see paywall-upgrade-cro.

Business & Finance61.2K installs