技能标识:YouTube Search Extractor
YouTube搜索结果视频链接提取器 - 可以搜索特定关键词并提取视频链接
这是一个用于从YouTube搜索结果中自动提取视频链接的技能。它可以:
bash
npm install -g agent-browser
agent-browser install
agent-browser install --with-deps
bash
git clone https://github.com/vercel-labs/agent-browser
cd agent-browser
pnpm install
pnpm build
agent-browser install
bash
bash
npm run search -- hydrasynth 实战应用 hydrasynth_links
bash
cd /Users/happy/.openclaw/workspace/skills/youtube-search-extractor
python3 youtubesearchextractor.py 关键词 输出文件名
bash
npm run search -- OpenClaw tutorial openclaw_links
bash
python3 youtubesearchextractor.py hydrasynth 实战应用 hydrasynth_links
bash
cd /Users/happy/.openclaw/workspace/skills/youtube-search-extractor
python3 youtubesearchextractor.py AI音乐创作 aimusiclinks
bash
python3 youtubesearchextractor.py [关键词] [输出文件名] [可选参数]
可选参数:
--headless # 无头浏览器模式(默认:启用)
--wait-time <秒数> # 页面加载等待时间(默认:5秒)
--max-links <数量> # 最大链接数(默认:50个)
--proxy <地址> # 使用代理服务器
创建youtubesearchconfig.json配置文件:
json
{
browser: {
headless: true,
wait_time: 5,
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
},
extractor: {
max_links: 50,
filter_relevance: true
}
}
bash
在search_templates目录中添加搜索模板:
json
{
name: Hydrasynth Search,
keywords: [hydrasynth, Hydrasynth, hydra synth],
description: 搜索Hydrasynth合成器相关的内容,
filters: [hydrasynth]
}
修改youtubesearchextractor.py中的链接匹配模式:
python
def extractvideolinks(html_content):
patterns =
rhref=[\[\],
rhref=\?youtube\.com/watch\?v=[\w-]+[^\]*)[\],
rhref=\?youtu\.be/[\w-]+[^\]*)[\]
]
# 其他提取逻辑...
本技能采用MIT许可证,可自由使用、修改和分发。
以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:
帮我安装 SkillHub 和 youtube-search-extractor-1776297327 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 youtube-search-extractor-1776297327 技能
skillhub install youtube-search-extractor-1776297327
文件大小: 18.12 KB | 发布时间: 2026-4-16 15:33