← 返回
内容创作 Key 中文

youtube copy of yt

Fetch YouTube video transcripts via APIFY API using residential proxies to bypass bot detection, supporting text and JSON output formats.
通过APIFY API获取YouTube视频字幕,利用住宅代理绕过机器人检测,支持文本和JSON输出格式。
inaor
内容创作 clawhub v1.0.0 1 版本 99771.8 Key: 需要
★ 1
Stars
📥 1,729
下载
💾 104
安装
1
版本
#latest

概述

youtube-apify-transcript

Fetch YouTube transcripts via APIFY API (works from cloud IPs, bypasses YouTube bot detection).

Why APIFY?

YouTube blocks transcript requests from cloud IPs (AWS, GCP, etc.). APIFY runs the request through residential proxies, bypassing bot detection reliably.

Free Tier

  • $5/month free credits (~714 videos)
  • No credit card required
  • Perfect for personal use

Cost

  • $0.007 per video (less than 1 cent!)
  • Track usage at: https://console.apify.com/billing

Links

Setup

  1. Create free APIFY account: https://apify.com/
  2. Get your API token: https://console.apify.com/account/integrations
  3. Set environment variable:
# Add to ~/.bashrc or ~/.zshrc
export APIFY_API_TOKEN="apify_api_YOUR_TOKEN_HERE"

# Or use .env file (never commit this!)
echo 'APIFY_API_TOKEN=apify_api_YOUR_TOKEN_HERE' >> .env

Usage

Basic Usage

# Get transcript as text
python3 scripts/fetch_transcript.py "https://www.youtube.com/watch?v=VIDEO_ID"

# Short URL also works
python3 scripts/fetch_transcript.py "https://youtu.be/VIDEO_ID"

Options

# Output to file
python3 scripts/fetch_transcript.py "URL" --output transcript.txt

# JSON format (includes timestamps)
python3 scripts/fetch_transcript.py "URL" --json

# Both: JSON to file
python3 scripts/fetch_transcript.py "URL" --json --output transcript.json

# Specify language preference
python3 scripts/fetch_transcript.py "URL" --lang de

Output Formats

Text (default):

Hello and welcome to this video.
Today we're going to talk about...

JSON (--json):

{
  "video_id": "dQw4w9WgXcQ",
  "title": "Video Title",
  "transcript": [
    {"start": 0.0, "duration": 2.5, "text": "Hello and welcome"},
    {"start": 2.5, "duration": 3.0, "text": "to this video"}
  ],
  "full_text": "Hello and welcome to this video..."
}

Error Handling

The script handles common errors:

  • Invalid YouTube URL
  • Video has no transcript
  • API quota exceeded
  • Network errors

Metadata

metadata:
  clawdbot:
    emoji: "📹"
    requires:
      env: ["APIFY_API_TOKEN"]
      bins: ["python3"]

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 19:05 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

A SecOps expert to handle security issues, ensure that protections are in place and collect evidence for security analysis. The Skill also contains skill integrity checks.

inaor
执行SecOps终端检查,涵盖EDR、Sysmon、更新、EVTX告警、最小权限、网络暴露、凭据保护、漏洞及每周评估。
★ 4 📥 2,510
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,130
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 294 📥 136,401