youtube-transcript
- Repo stars 3
- Author repo dotnix
YouTube Transcript
Purpose
Fetch a YouTube video's transcript using youtube-transcript-api.
Reference: https://gist.github.com/intellectronica/6178110791dc19a05d7c0173118fd48e
Run
nix-shell -p 'python312.withPackages (ps: [ ps.youtube-transcript-api ])' --run 'python {baseDir}/scripts/get_transcript.py "VIDEO_URL_OR_ID"'
With timestamps:
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:
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_IDhttps://youtu.be/VIDEO_IDhttps://youtube.com/embed/VIDEO_IDhttps://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.
- Fluxly category
- 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
- Author / version / license
- @yutakobayashidev · no license declared
- Fluxly token estimate
- Lean
- Fluxly setup estimate
- Guided setup
- External API key
- No requirement detected
- Detected OS requirements
- Unspecified
- Runtime requirements
- Python
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Detected network behavior
- External requests
- Install commands
- None (reference only)
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
The current SKILL.md does not define a fixed output example. Fetch a YouTube video's transcript using youtube-transcript-api. Reference: https://gist.github.com/intellectronica/6178110791dc19a05d7c0173118fd48e
With timestamps: Save to a file:
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.
https://www.youtube.com/watch?v=VIDEOID https://youtu.be/VIDEOID https://youtube.com/embed/VIDEOID
Captions must be available on the video. The script first tries the default transcript fetch, then falls back to the first available transcript language.
# 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. Author text anchors workflow facts; Fluxly only indexes current sections, terms, files, and commands.
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=VIDEOID · https://youtu.be/VIDEOID · https://youtube.com/embed/VIDEOID · https://youtube.com/v/VIDEOID
body sha256 -> 6dd9775922f7
Decide Fit First
Design Intent
How To Use It
Boundaries And Review