douyin-batch-download

cat-xierluo/legal-skills · updated Jun 2, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/cat-xierluo/legal-skills --skill douyin-batch-download
0 commentsdiscussion
summary

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

skill.md

抖音视频批量下载

本技能基于 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.dbvideo_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 下载地址
ffmpeg macOS: brew install ffmpeg / Ubuntu: sudo apt install ffmpeg

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

Python 包

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

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

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

参考资源

与其他技能配合

FunASR 语音转文字

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

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

how to use douyin-batch-download

How to use douyin-batch-download on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add douyin-batch-download
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

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

The skills CLI fetches douyin-batch-download from GitHub repository cat-xierluo/legal-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/douyin-batch-download

Reload or restart Cursor to activate douyin-batch-download. Access the skill through slash commands (e.g., /douyin-batch-download) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.640 reviews
  • Pratham Ware· Dec 24, 2024

    Registry listing for douyin-batch-download matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Nia Rahman· Dec 24, 2024

    I recommend douyin-batch-download for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Soo Khan· Dec 16, 2024

    Solid pick for teams standardizing on skills: douyin-batch-download is focused, and the summary matches what you get after install.

  • Ren Garcia· Dec 12, 2024

    Keeps context tight: douyin-batch-download is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Jin Menon· Nov 23, 2024

    We added douyin-batch-download from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Yash Thakker· Nov 15, 2024

    douyin-batch-download reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Jin Verma· Nov 15, 2024

    douyin-batch-download fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Meera Zhang· Nov 3, 2024

    douyin-batch-download is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Omar Perez· Oct 22, 2024

    Useful defaults in douyin-batch-download — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Jin Dixit· Oct 14, 2024

    Solid pick for teams standardizing on skills: douyin-batch-download is focused, and the summary matches what you get after install.

showing 1-10 of 40

1 / 4