Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
YouTube搜索结果视频链接提取器 - 可以搜索特定关键词并提取视频链接
YouTube搜索结果视频链接提取器 - 可以搜索特定关键词并提取视频链接
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
这是一个用于从YouTube搜索结果中自动提取视频链接的技能。它可以: 使用agent-browser工具自动执行YouTube搜索 从搜索结果HTML页面中提取视频链接 过滤和去重视频链接 生成格式化的链接列表
npm install -g agent-browser agent-browser install agent-browser install --with-deps
git clone https://github.com/vercel-labs/agent-browser cd agent-browser pnpm install pnpm build agent-browser install
# 搜索关键词并保存链接到文件 npm run search -- "关键词" "输出文件名"
npm run search -- "hydrasynth 实战应用" hydrasynth_links
cd /Users/happy/.openclaw/workspace/skills/youtube-search-extractor python3 youtube_search_extractor.py "关键词" "输出文件名"
youtube_search_extractor.py - 主要的搜索和提取脚本 SKILL.md - 技能文档 package.json - npm项目配置 .clawhub/ - ClawHub配置目录
<output_file>.html - YouTube搜索结果的HTML页面 <output_file>_links.txt - 提取的视频链接列表
使用agent-browser进行浏览器自动化 模拟真实用户搜索行为 智能等待页面加载完成
使用正则表达式匹配视频链接模式 处理相对链接到绝对链接的转换 自动去重和链接清理
清晰的编号列表 完整的YouTube URL格式 包含搜索时间戳
并行处理搜索和提取 优化的链接匹配算法 容错机制保障稳定运行
英文关键词:"Hydrasynth practical applications" 中文关键词:"hydrasynth 实战应用" 混合关键词:"OpenClaw tutorial 教程" 多关键词搜索:使用空格分隔
npm run search -- "OpenClaw tutorial" openclaw_links
python3 youtube_search_extractor.py "hydrasynth 实战应用" hydrasynth_links
cd /Users/happy/.openclaw/workspace/skills/youtube-search-extractor python3 youtube_search_extractor.py "AI音乐创作" ai_music_links
python3 youtube_search_extractor.py [关键词] [输出文件名] [可选参数] 可选参数: --headless # 无头浏览器模式(默认:启用) --wait-time <秒数> # 页面加载等待时间(默认:5秒) --max-links <数量> # 最大链接数(默认:50个) --proxy <地址> # 使用代理服务器
创建youtube_search_config.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 } }
安装依赖失败 npm install -g agent-browser --force 浏览器启动失败 agent-browser install --with-deps 网络连接问题 # 使用代理 python3 youtube_search_extractor.py "关键词" "输出文件名" --proxy "http://localhost:8080"
# 启用详细输出 python3 youtube_search_extractor.py "关键词" "输出文件名" --debug
在search_templates目录中添加搜索模板: { "name": "Hydrasynth Search", "keywords": ["hydrasynth", "Hydrasynth", "hydra synth"], "description": "搜索Hydrasynth合成器相关的内容", "filters": ["hydrasynth"] }
修改youtube_search_extractor.py中的链接匹配模式: def extract_video_links(html_content): patterns = [ r'href=["\'](/watch\?v=[\w-]+[^"\']*)["\']', r'href=["\'](https?://(?:www\.)?youtube\.com/watch\?v=[\w-]+[^"\']*)["\']', r'href=["\'](https?://(?:www\.)?youtu\.be/[\w-]+[^"\']*)["\']' ] # 其他提取逻辑...
请遵守YouTube的服务条款 合理使用API,避免过度请求 尊重版权,仅供个人学习使用
避免在短时间内进行大量搜索 使用适当的等待时间避免被封禁 考虑使用代理池分散请求
不在代码中硬编码个人信息 定期更新依赖库 监控网络连接安全性
本技能采用MIT许可证,可自由使用、修改和分发。
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.