← Back to Skills Marketplace
terrycarter1985

Douyin Scraper

by terrycarter1985 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
39
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install douyin-scraper-openclaw
Description
抖音内容爬虫,支持自然语言搜索视频内容,基于浏览器自动化实现
README (SKILL.md)

抖音内容爬虫 Skill

基于浏览器自动化的抖音内容爬虫,支持自然语言直接搜索视频内容。

功能特性

自然语言搜索 - 直接说"搜索一下海鲜视频"即可执行搜索 ✅ 视频列表抓取 - 获取搜索结果的视频标题、作者、点赞数等信息 ✅ 无代码交互 - 纯自然语言驱动 ✅ 会话持久化 - 自动保存浏览器状态

快速开始

安装依赖

npm install -g agent-browser
agent-browser install

使用方式 - 自然语言驱动

直接用自然语言发出指令即可:

搜索一下海鲜视频
帮我找一下美食探店视频
搜索搞笑段子
查找Python教程视频

工作原理

当用户输入自然语言搜索请求时,Skill 会:

  1. 意图识别 - 解析用户输入中的搜索关键词(如"海鲜视频"→关键词:海鲜)
  2. 浏览器导航 - 自动打开抖音搜索页面
  3. 自动输入 - 在搜索框输入关键词并提交
  4. 结果抓取 - 提取视频列表信息(标题、作者、点赞数等)
  5. 结果返回 - 格式化输出搜索结果

支持的自然语言句式

搜索一下[关键词]视频
帮我搜[关键词]
查找[关键词]内容
找一下[关键词]的视频
搜索[关键词]

更多示例见:examples/search_requests.txt

执行流程 (Agent 执行协议)

当用户请求抖音搜索时,按以下步骤执行:

步骤 1: 解析搜索关键词

从用户输入中提取搜索关键词:

  • 输入:"搜索一下海鲜视频" → 关键词:海鲜
  • 输入:"帮我找美食探店" → 关键词:美食探店
  • 输入:"搞笑段子" → 关键词:搞笑段子

步骤 2: 初始化浏览器会话

agent-browser --session douyin open "https://www.douyin.com/search"
agent-browser wait --load networkidle
agent-browser snapshot -i --json

步骤 3: 定位并填写搜索框

从 snapshot 中找到搜索框 ref,然后:

agent-browser fill @ref "关键词"
agent-browser press Enter
agent-browser wait --load networkidle
agent-browser wait 2000

步骤 4: 抓取搜索结果

agent-browser snapshot -i -d 4 --json

步骤 5: 提取并返回结果

从 snapshot 中提取:

  • 视频标题
  • 作者名称
  • 点赞/评论/收藏数
  • 视频链接

边界条件处理

  • 搜索框未找到:等待重试或刷新页面
  • 登录弹窗:自动关闭或跳过(抖音未登录也可搜索)
  • 页面加载缓慢:增加等待时间
  • 结果为空:提示用户更换关键词

示例对话

用户:搜索一下海鲜视频

Agent:正在搜索海鲜视频...

✅ 搜索完成!找到以下海鲜相关视频:

1. 【渔民阿峰】今天赶海收获大,抓到超大波士顿龙虾 | 12.5万赞
2. 海鲜大排档,帝王蟹这样吃才叫过瘾 | 8.3万赞
3. 挑战1000元吃海鲜自助,能回本吗? | 15.2万赞
...

进阶用法

保存认证状态(登录后抓取更多内容)

# 登录后保存状态
agent-browser --session douyin state save douyin-auth.json

# 下次直接加载状态
agent-browser --session douyin state load douyin-auth.json

滚动加载更多结果

agent-browser scroll down 1000
agent-browser wait 1000
agent-browser snapshot -i --json

使用方式总结:想说什么就说什么,Skill 会自动理解并执行! 🎬

Usage Guidance
Install only if you are comfortable adding the external `agent-browser` tool and using browser automation against Douyin. If you save Douyin login state, treat the saved auth file like a password and delete it when no longer needed.
Capability Analysis
Type: OpenClaw Skill Name: douyin-scraper-openclaw Version: 1.0.0 The skill is a legitimate browser automation tool designed to search and scrape video metadata from Douyin (TikTok China). It uses the 'agent-browser' utility to perform searches and extract information like titles and likes, with logic contained in SKILL.md and scripts/douyin-search.sh. No evidence of data exfiltration, credential theft, or malicious prompt injection was found; the code and instructions are consistent with the stated purpose.
Capability Assessment
Purpose & Capability
The artifacts coherently describe a Douyin browser-automation scraper for natural-language video search. The scraping purpose is disclosed, including handling anti-crawler or rate-limit issues, so this is a notice rather than a security concern.
Instruction Scope
The execution instructions stay focused on parsing a user search request, opening Douyin search, entering the keyword, and returning search-result metadata. No prompt override, hidden goal change, or unrelated tasking is evident.
Install Mechanism
The skill is marked as instruction-only with no registry install spec, but SKILL.md and README require installing the external global `agent-browser` tool and browser runtime. `skill.json` also references a missing `scripts/search.js`, which looks like a packaging inconsistency rather than malicious behavior.
Credentials
The skill sends user-provided search terms to Douyin through an automated browser, which is expected for this scraper. Users should still understand that searches occur on a third-party service and may be subject to platform limits.
Persistence & Privilege
The skill supports saving and reusing Douyin authentication/browser state. This is disclosed and purpose-aligned for logged-in scraping, but the saved session file should be treated like sensitive account access.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install douyin-scraper-openclaw
  3. After installation, invoke the skill by name or use /douyin-scraper-openclaw
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of douyin-scraper skill. - Enables natural language video search on Douyin using browser automation. - Supports extracting video title, author, and engagement metrics from search results. - No-code, fully natural language driven interaction. - Session persistence and authentication state saving supported. - Handles common edge cases like missing search box, login popups, or slow pages.
Metadata
Slug douyin-scraper-openclaw
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Douyin Scraper?

抖音内容爬虫,支持自然语言搜索视频内容,基于浏览器自动化实现. It is an AI Agent Skill for Claude Code / OpenClaw, with 39 downloads so far.

How do I install Douyin Scraper?

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

Is Douyin Scraper free?

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

Which platforms does Douyin Scraper support?

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

Who created Douyin Scraper?

It is built and maintained by terrycarter1985 (@terrycarter1985); the current version is v1.0.0.

💬 Comments