name: extract-videos description: Extract video metadata from a YouTube channel and save to CSV for tracking. Use when adding a new channel, extracting conference videos, populating video lists, or when the user mentions "extract videos", "get videos from channel", "add channel", or "video metadata".
Extract Videos from YouTube Channel
Why? Manually tracking YouTube videos is tedious and error-prone. This skill automates extracting video metadata (titles, durations, URLs) into a CSV for systematic transcript downloading and analysis.
Quick Start
# Recurring channel (adds to channels.yaml for future syncs)
ytscriber extract https://www.youtube.com/@ChannelName/videos \
--count 50 \
--folder <channel-name> \
--register-channel
# One-time extraction (conferences, playlists)
ytscriber extract <youtube_url> --count 100 --folder <name>
Workflow
1. Determine Extraction Type
| Scenario | Use --register-channel? |
Typical Count |
|---|---|---|
| New channel for ongoing tracking | Yes | 50-200 initial, then 20-50 for syncs |
| Conference talks (one-time) | No | 50-500 |
| Specific playlist/topic | No | As needed |
| Testing/exploration | No | 5-10 |
[!TIP] Use
--register-channelonly for channels you want to sync regularly. It adds the channel tochannels.yamlfor thesync-all-channelsskill.
2. Run Extraction Command
ytscriber extract <channel_url> \
--count <N> \
--folder <channel-name> \
[--register-channel]
Parameters:
| Option | Description | Default | When to Use |
|---|---|---|---|
--count, -n |
Number of latest videos | 10 | Always specify explicitly |
--folder |
Folder name for this channel | Required | Always use for tracking |
--register-channel |
Add to channels.yaml |
False | Recurring channels only |
--verbose, -v |
Enable verbose output | False | Debugging |
[!CAUTION] The
--countin the command sets the INITIAL extraction count. Thecountinchannels.yaml(set by--register-channel) controls FUTURE sync counts. These are independent values.
3. Verify Extraction
# Check CSV was created with expected columns
head -3 ~/Documents/YTScriber/<channel-name>/videos.csv
# Count extracted videos
wc -l ~/Documents/YTScriber/<channel-name>/videos.csv
Expected CSV columns:
url- Full YouTube video URLtitle- Video titleduration_minutes- Video lengthview_count- Number of viewsdescription- Video description (truncated to 500 chars)published_date- Video publish datetranscript_downloaded- Tracking field (initially empty)summary_done- Tracking field (initially empty)
Examples
Adding a New Channel for Regular Syncing
ytscriber extract https://www.youtube.com/@veritasium/videos \
--count 100 \
--folder veritasium \
--register-channel
# Result: 100 videos extracted, channel added to channels.yaml with count: 100
One-Time Conference Extraction
# Extract AWS re:Invent talks (won't be synced later)
ytscriber extract https://www.youtube.com/@AWSEventsChannel/videos \
--count 200 \
--folder aws-reinvent-2025
# No --register-channel = not added to channels.yaml
Re-running on Existing CSV (Incremental Update)
# Running again only adds NEW videos (duplicates auto-skipped)
ytscriber extract https://www.youtube.com/@veritasium/videos \
--count 20 \
--folder veritasium
# Safe to run multiple times - existing videos preserved
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| "No videos found" | Wrong URL format | Use https://www.youtube.com/@ChannelName/videos (include /videos) |
| CSV not created | Folder doesn't exist | The CLI creates the folder automatically |
| Duplicate videos appearing | Running with different URL variants | Always use canonical @handle/videos format |
Channel not in channels.yaml |
Forgot --register-channel |
Re-run with flag, or manually add to YAML |
Wrong video count in channels.yaml |
Flag uses command's --count value |
Edit channels.yaml manually to adjust future sync count |
Common Mistakes
Forgetting
/videosin URL- Wrong:
https://www.youtube.com/@veritasium - Right:
https://www.youtube.com/@veritasium/videos
- Wrong:
Using
--register-channelfor one-time extractions- This pollutes
channels.yamlwith channels you won't sync - Only use for channels you want in the regular sync rotation
- This pollutes
Expecting transcripts to download
- This skill ONLY extracts video metadata to CSV
- Use
download-transcriptsskill to actually fetch transcripts
Confusing command
--countwithchannels.yamlcount- Command
--count: How many videos to extract NOW channels.yamlcount: How many videos for FUTURE syncs- Initial extraction might be 200, but sync count might be 30
- Command
Quality Checklist
Before considering extraction complete:
- CSV exists with expected video count
- CSV has all required columns (url, title, duration_minutes, etc.)
- If recurring channel: entry exists in
channels.yaml - If recurring channel:
channels.yamlcount is set appropriately for future syncs
Next Steps
After extracting videos:
- Download transcripts: Use the
download-transcriptsskill - Sync channels later: Use
sync-all-channelsfor registered channels - Add summaries: Use
summarize-transcriptsafter downloading