← Back to Skills Marketplace
terrycarter1985

Douyin Hot Scraper

by terrycarter1985 · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ Security Clean
32
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install douyin-hot-scraper
Description
爬取抖音热榜和搜索数据,支持自然语言搜索请求如"搜索一下海鲜视频"、"看看抖音热榜
README (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
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install douyin-hot-scraper
  3. After installation, invoke the skill by name or use /douyin-hot-scraper
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.1
v2.0.1: 修复热榜标签显示
v2.0.0
v2.0: 真实热榜 API + 自然语言搜索支持,移除 mock 数据
v1.1.0
v1.1.0: 添加自然语言搜索模式(nl)、热榜公开API(稳定可用)、修复搜索关键词提取、修复编码问题、明确搜索限制说明
Metadata
Slug douyin-hot-scraper
Version 2.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Douyin Hot Scraper?

爬取抖音热榜和搜索数据,支持自然语言搜索请求如"搜索一下海鲜视频"、"看看抖音热榜. It is an AI Agent Skill for Claude Code / OpenClaw, with 32 downloads so far.

How do I install Douyin Hot Scraper?

Run "/install douyin-hot-scraper" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Douyin Hot Scraper free?

Yes, Douyin Hot Scraper is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Douyin Hot Scraper support?

Douyin Hot Scraper is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Douyin Hot Scraper?

It is built and maintained by terrycarter1985 (@terrycarter1985); the current version is v2.0.1.

💬 Comments