← 返回 Skills 市场
1032
总下载
1
收藏
9
当前安装
1
版本数
在 OpenClaw 中安装
/install douyin-keyword-search
功能描述
自动化抓取抖音搜索结果页面的文章数据,支持关键词搜索、格式输出和数量限制,需安装Playwright和Chromium浏览器。
使用说明 (SKILL.md)
抖音关键词搜索抓取技能
通过浏览器自动化抓取抖音搜索结果页面的文章数据。
文件说明
| 文件 | 说明 |
|---|---|
douyin_keyword_search.py |
Python 主脚本 |
douyin_keyword_search.sh |
Shell 包装脚本 |
requirements.txt |
Python 依赖列表 |
安装依赖
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/txt | json |
--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"
}
]
注意事项
- 首次使用需要安装 Playwright 和 Chromium 浏览器
- 抖音需要登录才能查看完整搜索结果,建议首次运行时不使用
--headless参数 - 请遵守抖音的使用条款和 robots.txt 规则
- 建议控制抓取频率,避免对服务器造成压力
许可证
MIT License
安全使用建议
This skill appears to do what it says: automated scraping of Douyin search results using Playwright. Before installing/running, consider: (1) running the code in an isolated environment (virtualenv) because it may install Playwright and download Chromium; (2) the script may prompt you to log in in a non-headless browser and will save a debug screenshot in the script directory if selectors fail; (3) scraping may violate Douyin's terms of service—respect robots.txt and rate limits; (4) inspect the included Python file yourself if you have concerns (it does not exfiltrate data to remote servers). If you do not want the script to auto-install packages, decline the install prompt and run dependency installation manually in a controlled environment.
功能分析
Type: OpenClaw Skill
Name: douyin-keyword-search
Version: 1.0.0
The skill is classified as suspicious due to a significant arbitrary file write vulnerability in `douyin_keyword_search.py`. The `--output-file` argument allows a user to specify any file path, potentially overwriting critical system files with scraped data, which can lead to denial of service or system instability. Additionally, the script uses `os.system()` for dependency installation, which, while not directly exploitable in this specific context due to hardcoded commands and user prompts, is a less secure practice than using the `subprocess` module.
能力评估
Purpose & Capability
Name/description claim browser-automated Douyin keyword scraping; included files (Python script, shell wrapper, requirements) and SKILL.md all implement and document Playwright + Chromium usage. No unrelated services, credentials, or binaries are requested.
Instruction Scope
SKILL.md instructs installing Playwright and Chromium and how to run the script. The runtime code only visits Douyin pages, extracts page elements, optionally saves a screenshot to the script directory for debugging, and prints/writes results. It does not read unrelated system files or send collected data to external endpoints beyond the target site.
Install Mechanism
There is no automated install spec in the registry metadata; SKILL.md asks the user to run pip and playwright install manually. The repository contains requirements.txt and the script can optionally run pip install via os.system if the user consents. No suspicious external download URLs or archive extraction are used.
Credentials
The skill requires no environment variables, credentials, or config paths. It does check for local Chrome/Edge executable paths on Windows to optionally reuse a local browser, which is reasonable for a browser automation tool.
Persistence & Privilege
Skill does not request persistent 'always' inclusion, does not modify other skills or global agent settings, and does not claim elevated agent privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install douyin-keyword-search - 安装完成后,直接呼叫该 Skill 的名称或使用
/douyin-keyword-search触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the Douyin Keyword Search skill.
- Supports automated scraping of article data from Douyin search results via browser automation.
- Provides command-line options for keyword, output format (json/csv/txt), result limit, headless mode, and output file path.
- Includes sample outputs and detailed usage instructions.
- Requires Playwright and Chromium installation.
元数据
常见问题
douyin-keyword-search 是什么?
自动化抓取抖音搜索结果页面的文章数据,支持关键词搜索、格式输出和数量限制,需安装Playwright和Chromium浏览器。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1032 次。
如何安装 douyin-keyword-search?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install douyin-keyword-search」即可一键安装,无需额外配置。
douyin-keyword-search 是免费的吗?
是的,douyin-keyword-search 完全免费(开源免费),可自由下载、安装和使用。
douyin-keyword-search 支持哪些平台?
douyin-keyword-search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 douyin-keyword-search?
由 urhd528(@urhd528)开发并维护,当前版本 v1.0.0。
推荐 Skills