douyin-scraper

抖音图文笔记采集工具。支持自然语言搜索(如"搜索一下海鲜视频"),自动提取关键词 → 搜索 → 筛选「图文·一周内」→ Playwright 截图(绕过反爬虫)→ Baidu OCR 识别图片文字 → 输出 Markdown 报告(含热度评分)。当用户提到"抖音搜索"、"抖音图文采集"、"抖音笔记抓取"、"抖音爬虫"、"抖音内容采集"、"搜一下xxx视频/笔记"等场景时加载此技能。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "douyin-scraper" with this command: npx skills add terrycarter1985/douyin-scraper-v2

douyin-scraper

抖音图文笔记采集工具 —— 一条命令完成:搜索 → 筛选图文 → 截图 → OCR → Markdown 报告。

⚠️ 前置配置

1. 安装依赖

pip install playwright requests python-dotenv
python -m playwright install chromium

2. 配置 Baidu PaddleOCR Token

在技能目录创建 .env

BAIDU_PADDLEOCR_TOKEN=你的token

获取 Token:访问 百度 AI Studio,免费注册,每天 1 万次免费调用。

3. 登录抖音(只需一次)

python <skill_path>/scripts/login.py

浏览器打开抖音,扫码登录后关闭。登录状态自动保存,后续无需重复操作。


🗣️ 自然语言搜索(Agent 入口)

当用户用自然语言提出搜索需求时,先提取关键词,再调用脚本

提取规则

  1. 从用户输入中提取核心搜索词(去掉"搜索一下"、"帮我找"、"看看"等助词)
  2. 如果用户指定了数量,提取为 --count;否则用默认值
  3. 如果用户说"只要图片"或"不用识别文字",加 --no-ocr
  4. 关键词尽量简短精炼(2-6字),不要把整个句子当关键词

示例

用户输入提取关键词命令
搜索一下海鲜视频海鲜--keyword "海鲜"
帮我找找韩国医美相关内容韩国医美--keyword "韩国医美"
抖音上最近有什么减肥餐笔记减肥餐--keyword "减肥餐"
看看咖啡相关的图文,要5条咖啡--keyword "咖啡" --count 5
搜一下宠物猫,不用OCR宠物猫--keyword "宠物猫" --no-ocr
抖音搜索穿搭技巧穿搭技巧--keyword "穿搭技巧"

Agent 执行步骤

  1. 从用户输入提取关键词
  2. 运行命令:
python <skill_path>/scripts/full_workflow.py --keyword "<提取的关键词>" [--count N] [--no-ocr]
  1. 脚本完成后,读取 output/ 下生成的 Markdown 报告
  2. 向用户摘要报告内容(笔记数量、热度最高的几条、关键发现)

🔧 直接命令行使用

# 采集 10 篇图文笔记(含 OCR)
python <skill_path>/scripts/full_workflow.py --keyword "韩国医美"

# 指定数量
python <skill_path>/scripts/full_workflow.py --keyword "减肥餐" --count 5

# 跳过 OCR(仅截图)
python <skill_path>/scripts/full_workflow.py --keyword "咖啡" --no-ocr
参数说明默认值
--keyword搜索关键词必填
--count采集笔记数量5
--no-ocr跳过 OCR关闭

输出

报告保存至 output/notes_{keyword}_{timestamp}.md,图片保存至 data/images/

每篇笔记包含:

  • 🔥 热度分数(点赞数 / 发布天数)及计算公式
  • 👍 点赞数、发布时间、作者、原文链接
  • 📝 原文描述
  • 🔍 OCR 识别的图片文字(支持多图)
  • 🖼️ 本地截图路径

技术特点

  • Playwright 截图:通过 element.screenshot() 截取内容图,绕过抖音图片 URL 反爬虫
  • 图文过滤:自动识别并跳过视频,只采集「图文」类型笔记
  • OCR 噪音过滤:自动去除截图中的抖音导航栏文字(精选/推荐/关注 等)
  • 多图支持:一篇图文多张图片逐张截图 + OCR,合并识别结果
  • 反检测:有头浏览器(headless=False)+ 拟人操作节奏,避免触发验证码
  • 热度公式likes / days_ago,越新越热排越前

目录结构

douyin-scraper/
├── scripts/
│   ├── full_workflow.py   # 主流水线
│   └── login.py           # 登录脚本
├── data/
│   └── images/            # 截图
├── output/                # Markdown 报告
├── profile/               # 浏览器登录状态
└── .env                   # Token 配置

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Hcl Tech

印度第四大IT服务公司,专注工程研发与半导体设计外包,服务半导体、航空航天和汽车行业。

Registry SourceRecently Updated
General

Godot Engine

Open-source MIT-licensed game engine from Argentina, gaining traction post-Unity 2023, supported by sponsors with strengths in 2D and community-driven innova...

Registry SourceRecently Updated
General

Guardian Life

Mutual life insurer since 1860 focused on financial strength, employee benefits, and long-term value for policyholders through life, dental, vision, and disa...

Registry SourceRecently Updated
General

Goodyear

Provides detailed insights into Goodyear's industry position, competitive advantages, historic achievements, and investment potential.

Registry SourceRecently Updated