youtube transcript
- Repo stars 3
- Author repo dotnix
- Domain
- Data
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 88 / 100 · heuristic scan, not runtime safety proof
- Runtime evidence
- Not run; no isolated runtime test evidence is currently recorded
- Author / version / license
- @yutakobayashidev · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- Python
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- External requests
- Install commands
- None (reference only)
Heads up: Tool permissions are not declared; actual access depends on the runtime.
# YouTube Transcript
## Purpose
Fetch a YouTube video's transcript using `youtube-transcript-api`.
Reference: https://gist.github.com/intellectronica/6178110791dc19a05d7c0173118fd48e
## Run
```bash
nix-shell -p 'python312.withPackages (ps: [ ps.youtube-transcript-api ])' --run 'python {baseDir}/scripts/get_transcript.py "VIDEO_URL_OR_ID"'
```
With timestamps:
```bash
nix-shell -p 'python312.withPackages (ps: [ ps.youtube-transcript-api ])' --run 'python {baseDir}/scripts/get_transcript.py "VIDEO_URL_OR_ID" --timestamps'
```
Save to a file:
```bash
nix-shell -p 'python312.withPackages (ps: [ ps.youtube-transcript-api ])' --run 'python {baseDir}/scripts/get_transcript.py "VIDEO_URL_OR_ID" --timestamps' > transcript.txt
```
## Output Rules
- Do not alter transcript wording.
- Without timestamps, it is acceptable to rewrap lines into complete paragraphs if the user asked for readable text.
- With timestamps, preserve one caption segment per line.
- If the user asks to save the transcript, write it to the requested path.
- If no output file is specified but a file is needed, use `<video-id>-transcript.txt`.
## Supported Inputs
- `https://www.youtube.com/watch?v=VIDEO_ID`
- `https://youtu.be/VIDEO_ID`
- `https://youtube.com/embed/VIDEO_ID`
- `https://youtube.com/v/VIDEO_ID`
- Raw 11-character video ID
## Notes
- Captions must be available on the video.
- The script first tries the default transcript fetch, then falls back to the first available transcript language.
Sections and files
Listed in source order.
sections -> Purpose → Run → Output Rules → Supported Inputs → Notes
terms -> Fetch a YouTube video's transcript using youtube-transcript-api. · - Do not alter transcript wording. · - Captions must be available on the video.
files/cmd -> youtube-transcript-api · <video-id>-transcript.txt · https://www.youtube.com/watch?v=VIDEO_ID · https://youtu.be/VIDEO_ID · https://youtube.com/embed/VIDEO_ID · https://youtube.com/v/VIDEO_ID
body sha256 -> 6dd9775922f7
Purpose
Fetch a YouTube video's transcript using
youtube-transcript-api. Reference: https://gist.github.com/intellectronica/6178110791dc19a05d7c0173118fd48eRun
With timestamps: Save to a file:
Output Rules
Do not alter transcript wording. Without timestamps, it is acceptable to rewrap lines into complete paragraphs if the user asked for readable text. With timestamps, preserve one caption segment per line. If the user asks to save the transcript, write it to the requested path. If no output file is specified but a file is needed, use
<video-id>-transcript.txt.Supported Inputs
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://youtube.com/embed/VIDEO_IDhttps://youtube.com/v/VIDEO_IDRaw 11-character video IDNotes
Captions must be available on the video. The script first tries the default transcript fetch, then falls back to the first available transcript language.