YouTube Transcript
@xthezealot
npx machina-cli add skill @xthezealot/youtube-transcript --openclawYouTube Transcript
Fetch transcripts from YouTube videos and optionally summarize them.
Quick Start
python3 scripts/fetch_transcript.py <video_id_or_url> [languages]
Examples:
python3 scripts/fetch_transcript.py dQw4w9WgXcQ
python3 scripts/fetch_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
python3 scripts/fetch_transcript.py dQw4w9WgXcQ "fr,en,de"
Output: JSON with video_id, title, author, full_text, and timestamped transcript array.
Workflow
- Run
fetch_transcript.pywith video ID or URL - Script checks VPN, brings it up if needed
- Returns JSON with full transcript text
- Summarize the
full_textfield as needed
Language Codes
Default priority: en, fr, de, es, it, pt, nl
Override with second argument: python3 scripts/fetch_transcript.py VIDEO_ID "ja,ko,zh"
Setup & Configuration
See references/SETUP.md for:
- Python dependencies installation
- WireGuard VPN configuration (required for cloud VPS)
- Troubleshooting common errors
- Alternative proxy options
Overview
Fetch transcripts from YouTube videos and optionally summarize them for quick insights. It returns a JSON payload with video_id, title, author, full_text, and a timestamped transcript array. It can fetch transcripts through a residential IP proxy to bypass YouTube's cloud IP blocks.
How This Skill Works
Run fetch_transcript.py with a YouTube video ID or URL. The script ensures a VPN/proxy (via residential IP) is active and fetches the transcript, supporting optional language codes. It returns a JSON payload containing video_id, title, author, full_text, and a timestamped transcript array, which you can summarize as needed.
When to Use It
- You need a complete transcript of a YouTube video for analysis or notes.
- You want a concise summary of a video's transcript for quick briefing.
- You need to extract quotes, topics, or timestamps from the transcript.
- You must access transcripts that are region-blocked and fetch them via residential proxy.
- You require transcripts in multiple languages by specifying language codes.
Quick Start
- Step 1: Run python3 scripts/fetch_transcript.py <video_id_or_url> [languages]
- Step 2: If needed, specify languages like fr,en,de
- Step 3: Use the output JSON's full_text or transcript array; summarize as needed
Best Practices
- Validate the video ID or URL before running.
- Use the languages option to fetch preferred languages (default en, fr, de, es, it, pt, nl).
- Ensure the VPN/WireGuard proxy is active if your environment requires it.
- Review the full_text before summarizing to avoid misinterpretation.
- Cache or store transcripts for commonly accessed videos to reduce fetch times.
Example Use Cases
- Transcribe a university lecture to create searchable notes.
- Generate a concise briefing by summarizing a product demonstration video.
- Extract key topics and timestamps for an employee training video.
- Fetch a regional-blocked video transcript using a residential IP proxy.
- Create multilingual transcripts by requesting ja, ko, zh outputs.