douyin-keyword-search

# 抖音关键词搜索抓取技能

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "douyin-keyword-search" with this command: npx skills add urhd528/douyin-keyword-search

抖音关键词搜索抓取技能

通过浏览器自动化抓取抖音搜索结果页面的文章数据。

文件说明

文件说明
douyin_keyword_search.pyPython 主脚本
douyin_keyword_search.shShell 包装脚本
requirements.txtPython 依赖列表

安装依赖

pip install -r requirements.txt
python -m playwright install chromium

使用方法

命令行调用

# 基本使用
python douyin_keyword_search.py --keyword "关键词"

# 指定输出格式和数量
python douyin_keyword_search.py -k "科技新闻" -o json -l 30

# 保存到文件
python douyin_keyword_search.py -k "美食" -o csv -f results.csv

# 无头模式(后台运行)
python douyin_keyword_search.py -k "新闻" --headless

参数说明

参数说明默认值
--keyword, -k搜索关键词(必填)-
--output, -o输出格式:json/csv/txtjson
--limit, -l抓取数量限制20
--headless无头模式,不显示浏览器窗口false
--output-file, -f输出文件路径控制台输出

Claude Code 技能调用

在 Claude Code 中配置后可使用:

/skill douyin-keyword-search --keyword "人工智能"

输出示例

[
  {
    "title": "视频标题",
    "author": "作者名称",
    "url": "https://www.douyin.com/video/xxx",
    "stats": ["10万点赞", "5000评论"],
    "keyword": "搜索关键词",
    "crawl_time": "2024-01-01T12:00:00"
  }
]

注意事项

  1. 首次使用需要安装 Playwright 和 Chromium 浏览器
  2. 抖音需要登录才能查看完整搜索结果,建议首次运行时不使用 --headless 参数
  3. 请遵守抖音的使用条款和 robots.txt 规则
  4. 建议控制抓取频率,避免对服务器造成压力

许可证

MIT License

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Openclaw Video Editor

Pro-Studio v4.0.0. AI-powered background removal, smart subtitle placement, and cinematic LUT presets. The ultimate production suite for high-end video content.

Registry SourceRecently Updated
General

IOC 智能巡检报告

为 IOC(智能运营中心)生成智能巡检报告。自动分析设备状态、报警记录、能耗数据,生成专业的巡检日报/周报。支持连接 PostgreSQL 数据库读取实时数据,输出 Markdown/HTML 报告。适用于物业管理、商业综合体、工业园区等场景。

Registry SourceRecently Updated
General

Expert Library Plus Skill

Install and manage Expert Library Plus - the world's first AI expert library with name-based quality anchors. Enhances 43+ professional experts with historic...

Registry SourceRecently Updated
General

Api Gateway 1.0.46

Connect to 100+ APIs (Google Workspace, Microsoft 365, Notion, Slack, Airtable, HubSpot, etc.) with managed OAuth. Use this skill when users want to interact...

Registry SourceRecently Updated