← 返回 Skills 市场
terrycarter1985

抖音爬虫V2

作者 terrycarter1985 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
56
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install dy-scraper-v2
功能描述
爬取抖音爆款视频和文案数据。当用户用自然语言说"搜索一下XX视频"、"帮我搜抖音XX"、"抖音上找XX"等意图时,自动提取关键词并执行搜索。也支持获取热榜。
使用说明 (SKILL.md)

抖音爆款爬虫 Skill

何时触发

当用户的消息包含以下意图时,使用本 skill:

  • 搜索视频:「搜索一下海鲜视频」「帮我搜抖音上的美食」「抖音搜小龙虾」「找一下XX相关的视频」
  • 获取热榜:「抖音热榜」「看看抖音热门」「今天抖音什么火」
  • 关键词提取:从自然语言中提取核心搜索词

关键词提取规则

  1. 去掉「搜索一下」「帮我搜」「找一下」「抖音上」等意图词
  2. 去掉「视频」「相关」「的」等冗余词
  3. 保留核心名词/短语作为 keyword
  4. 示例:
    • 「搜索一下海鲜视频」→ 海鲜
    • 「帮我搜抖音上卖海鲜的」→ 卖海鲜
    • 「找一下小龙虾做法」→ 小龙虾做法

搜索流程

Step 1: 运行脚本

cd /root/.openclaw/workspace/douyin-scraper && python scripts/scraper.py search --keyword "\x3C关键词>" --limit 10

Step 2: 检查结果

  • 如果输出包含 ✅ 获取到 → 真实数据,直接展示给用户
  • 如果输出包含 示例数据 → Playwright 被抖音反爬拦截,进入 Step 3

Step 3: web_search 降级(重要!)

当脚本返回 mock 数据时,必须使用 web_search 工具作为降级方案:

web_search: query="site:douyin.com \x3C关键词>" count=10

从搜索结果中提取:

  • title → 视频标题
  • url → 视频链接(必须是 douyin.com 域名)
  • description → 视频描述/摘要

然后以统一格式展示给用户。

Step 4: 展示结果

无论数据来源,统一按以下格式展示:

🔍 抖音搜索:\x3C关键词>
共找到 N 条结果

1. **视频标题**
   作者: xxx | 👍 点赞数 | 🔗 链接

2. ...

热榜流程

同理,先运行脚本,失败则用 web_search: query="抖音热榜" 降级。

注意事项

  • Playwright + Chromium 已预装,但抖音有反爬机制,headless 模式大概率被拦截
  • web_search 降级是主要可用路径,务必执行
  • 仅供学习研究使用
安全使用建议
Install only if you are comfortable with a scraper that sends search terms to Douyin and sometimes Brave Search, may use a BRAVE_API_KEY from the environment, installs Playwright/Chromium, and can save output files. Treat returned results cautiously unless the skill clearly identifies whether they came from Douyin, Brave Search, or sample data.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
Browser automation, Douyin access, hot-list search, and optional export fit the stated scraper purpose, but the implementation also falls back to Brave Search and fabricated sample records, which can blur whether results are real Douyin data.
Instruction Scope
SKILL.md uses broad natural-language triggers and says the web_search fallback must be used, without requiring confirmation before sending the user's keyword to an external search provider or clearly labeling every result source.
Install Mechanism
The install scripts create a virtual environment, install Playwright and Chromium, optionally run npm install, and can build a Docker image; these are expected for a browser scraper but are meaningful host changes.
Credentials
Network access to Douyin is expected, but scripts also call Brave Search with BRAVE_API_KEY from the environment; that credential and third-party data flow are not clearly disclosed in the user-facing description.
Persistence & Privilege
No autostart, privilege escalation, or background persistence was found; the main local side effects are dependency/browser installs, generated install artifacts, and optional JSON/CSV writes to user-supplied paths.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dy-scraper-v2
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dy-scraper-v2 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
添加web_search降级,自然语言触发,关键词提取
v1.0.0
自然语言搜索+真实数据提取
元数据
Slug dy-scraper-v2
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

抖音爬虫V2 是什么?

爬取抖音爆款视频和文案数据。当用户用自然语言说"搜索一下XX视频"、"帮我搜抖音XX"、"抖音上找XX"等意图时,自动提取关键词并执行搜索。也支持获取热榜。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 56 次。

如何安装 抖音爬虫V2?

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

抖音爬虫V2 是免费的吗?

是的,抖音爬虫V2 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

抖音爬虫V2 支持哪些平台?

抖音爬虫V2 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 抖音爬虫V2?

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

💬 留言讨论