# Send Youtube Search Extractor to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "youtube-search-extractor",
    "name": "Youtube Search Extractor",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/shuai1iu/youtube-search-extractor",
    "canonicalUrl": "https://clawhub.ai/shuai1iu/youtube-search-extractor",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/youtube-search-extractor",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=youtube-search-extractor",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "CONTRIBUTING.md",
      "README.md",
      "SKILL.md",
      "package.json",
      "test_from_file.py",
      "test_installation.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/youtube-search-extractor"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/youtube-search-extractor",
    "downloadUrl": "https://openagent3.xyz/downloads/youtube-search-extractor",
    "agentUrl": "https://openagent3.xyz/skills/youtube-search-extractor/agent",
    "manifestUrl": "https://openagent3.xyz/skills/youtube-search-extractor/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/youtube-search-extractor/agent.md"
  }
}
```
## Documentation

### 功能概述

这是一个用于从YouTube搜索结果中自动提取视频链接的技能。它可以：

使用agent-browser工具自动执行YouTube搜索
从搜索结果HTML页面中提取视频链接
过滤和去重视频链接
生成格式化的链接列表

### 安装agent-browser（npm方式推荐）

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 -- "关键词" "输出文件名"

### 示例：搜索Hydrasynth实战应用视频

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 教程"
多关键词搜索：使用空格分隔

### 1. 搜索OpenClaw相关视频

npm run search -- "OpenClaw tutorial" openclaw_links

### 2. 搜索Hydrasynth实战应用视频

python3 youtube_search_extractor.py "hydrasynth 实战应用" hydrasynth_links

### 3. 搜索特定主题的视频

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许可证，可自由使用、修改和分发。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: shuai1iu
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/youtube-search-extractor)
- [Send to Agent page](https://openagent3.xyz/skills/youtube-search-extractor/agent)
- [JSON manifest](https://openagent3.xyz/skills/youtube-search-extractor/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/youtube-search-extractor/agent.md)
- [Download page](https://openagent3.xyz/downloads/youtube-search-extractor)