← 返回 Skills 市场
terrycarter1985

Douyin Hot Scraper

作者 terrycarter1985 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ 安全检测通过
32
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install douyin-hot-scraper
功能描述
爬取抖音热榜和搜索数据,支持自然语言搜索请求如"搜索一下海鲜视频"、"看看抖音热榜
使用说明 (SKILL.md)

抖音数据爬虫 Skill

功能概述

获取抖音热榜数据和关键词搜索结果。

功能特性

  • 🔥 热榜获取 - 获取抖音实时热搜榜(公开 API,无需登录)
  • 🔍 关键词搜索 - 按关键词搜索抖音视频(Playwright 浏览器自动化 + API 回退)
  • 📝 文案提取 - 提取视频标题、描述、标签等
  • 🎬 数据统计 - 获取播放量、点赞数、评论数等

自然语言调用

当用户用自然语言表达搜索意图时,直接调用,无需用户手动指定命令。

识别模式

用户说 动作 命令
搜索一下海鲜视频 搜索 python3 scripts/scraper.py search --keyword "海鲜" --limit 10
看看抖音热榜 热榜 python3 scripts/scraper.py hot --limit 20
找一些关于小龙虾的视频 搜索 python3 scripts/scraper.py search --keyword "小龙虾" --limit 10
抖音最近什么火 热榜 python3 scripts/scraper.py hot --limit 20
帮我搜一下美食 搜索 python3 scripts/scraper.py search --keyword "美食" --limit 10

关键词提取规则

  1. 从用户自然语言中提取核心搜索词
  2. 去掉"视频"、"一下"、"一些"等无意义词
  3. 保留具体品类/主题词(如"海鲜"、"小龙虾"、"美食")
  4. 如果用户指定数量,使用 --limit;否则默认 10

依赖

Playwright 和 Chromium 浏览器。首次使用前运行:

pip install playwright && playwright install chromium

使用方法

搜索关键词

# 基本搜索
python3 scripts/scraper.py search --keyword "海鲜" --limit 10

# 仅使用热榜 API(更快,无需浏览器)
python3 scripts/scraper.py search --keyword "海鲜" --method api --limit 10

# 搜索并保存结果
python3 scripts/scraper.py search --keyword "海鲜售卖" --limit 20 --output seafood.json

获取热榜

# 获取热榜
python3 scripts/scraper.py hot --limit 20

# 保存热榜数据
python3 scripts/scraper.py hot --limit 50 --output hot.json

搜索方式说明

方式 说明 适用场景
auto(默认) 先尝试浏览器搜索,失败则回退热榜 API 通用
api 仅使用热榜 API,按关键词过滤 快速获取,无需浏览器
browser 仅使用 Playwright 浏览器 需要精确搜索结果

⚠️ 抖音网页版搜索需要登录。如果未登录,auto 模式会自动回退到热榜 API。

输出数据格式

JSON

[
  {
    "title": "视频标题",
    "description": "视频描述",
    "author": "作者昵称",
    "play_count": 1000000,
    "like_count": 50000,
    "comment_count": 2000,
    "share_count": 1000,
    "url": "https://www.douyin.com/video/xxx",
    "tags": ["标签1", "标签2"],
    "publish_time": "2026-06-08",
    "hot_value": 5000000
  }
]

注意事项

  1. 遵守平台规则 - 合理使用,避免频繁请求
  2. 数据用途 - 仅供学习和研究
  3. 搜索限制 - 抖音网页搜索需登录,未登录时回退到热榜数据
  4. 请求间隔 - 建议搜索间隔 ≥ 5 秒

技术架构

  • 热榜 API: https://www.douyin.com/aweme/v1/web/hot/search/list/ — 公开接口,无需登录
  • 搜索: Playwright 浏览器自动化 → 抖音搜索页 → 提取 SSR/DOM 数据 → 回退热榜 API
安全使用建议
Install only if you are comfortable with the agent querying Douyin and sending your Douyin search keywords over the network. Use explicit Douyin-related requests and avoid entering sensitive keywords; optional output files should be saved only to paths you intend.
能力评估
Purpose & Capability
The scripts and documentation consistently describe fetching Douyin hot-search data and keyword results; the urllib API calls and optional Playwright automation match that purpose.
Instruction Scope
The natural-language activation examples are broad and one example does not explicitly mention Douyin, so users should phrase requests deliberately, but the behavior remains related to the stated scraping/search purpose.
Install Mechanism
No automatic install hook or package dependency execution is declared; setup is documented as a manual Playwright and Chromium installation step.
Credentials
The skill makes outbound requests to douyin.com and may send search keywords there, which is expected for a scraper but relevant for privacy-sensitive searches.
Persistence & Privilege
No background service, privilege escalation, local credential/profile access, or unbounded persistence was found; files are written only when the user supplies an output path.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install douyin-hot-scraper
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /douyin-hot-scraper 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
v2.0.1: 修复热榜标签显示
v2.0.0
v2.0: 真实热榜 API + 自然语言搜索支持,移除 mock 数据
v1.1.0
v1.1.0: 添加自然语言搜索模式(nl)、热榜公开API(稳定可用)、修复搜索关键词提取、修复编码问题、明确搜索限制说明
元数据
Slug douyin-hot-scraper
版本 2.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Douyin Hot Scraper 是什么?

爬取抖音热榜和搜索数据,支持自然语言搜索请求如"搜索一下海鲜视频"、"看看抖音热榜. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 32 次。

如何安装 Douyin Hot Scraper?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install douyin-hot-scraper」即可一键安装,无需额外配置。

Douyin Hot Scraper 是免费的吗?

是的,Douyin Hot Scraper 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Douyin Hot Scraper 支持哪些平台?

Douyin Hot Scraper 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Douyin Hot Scraper?

由 terrycarter1985(@terrycarter1985)开发并维护,当前版本 v2.0.1。

💬 留言讨论