Install
openclaw skills install douyin-search-v2爬取抖音搜索结果和热榜数据,使用 Playwright 自动化浏览器操作。支持自然语言搜索(如"搜索一下海鲜视频")、关键词搜索、获取热榜、提取视频信息等功能。
openclaw skills install douyin-search-v2使用 Playwright 自动化浏览器操作(移动端模式),爬取抖音搜索结果和热榜数据。
# Python 版本
pip install playwright
playwright install chromium
# Node.js 版本
npm install
npx playwright install chromium
Skill 支持中文自然语言查询,会自动提取关键词:
| 自然语言输入 | 提取的关键词 |
|---|---|
| 搜索一下海鲜视频 | 海鲜 |
| 帮我找小龙虾相关内容 | 小龙虾 |
| 看看海鲜售卖的视频 | 海鲜售卖 |
| 找一些海鲜做法 | 海鲜做法 |
# 自然语言搜索
python scripts/scraper.py search --keyword "搜索一下海鲜视频" --limit 10
# 关键词搜索
python scripts/scraper.py search --keyword "海鲜" --limit 10
# 获取热榜
python scripts/scraper.py hot --limit 20
# 搜索并保存结果
python scripts/scraper.py search --keyword "海鲜售卖" --limit 20 --output seafood_videos.json
# 自然语言搜索
node scripts/douyin_scraper.js search "搜索一下海鲜视频" 10
# 关键词搜索
node scripts/douyin_scraper.js search "海鲜" 10
# 获取热榜
node scripts/douyin_scraper.js hot 20
当用户用自然语言请求搜索时,Agent 应:
python scripts/scraper.py search --keyword "<关键词>" --limit <数量>用户: 搜索一下海鲜视频
Agent: 好的,我来搜索"海鲜"相关的视频...
→ python scripts/scraper.py search --keyword "海鲜" --limit 10
→ [展示结果]
[
{
"title": "视频标题",
"description": "视频描述",
"author": "作者昵称",
"play_count": 1000000,
"like_count": 50000,
"comment_count": 2000,
"share_count": 1000,
"url": "https://www.douyin.com/search/海鲜",
"tags": ["海鲜", "搜索"],
"publish_time": "2026-06-06"
}
]
⚠️ 重要提示:
playwright install chromium
--delay 参数douyin.com/search/<keyword>,从渲染后的页面提取结果douyin.com/aweme/v1/web/hot/search/list/