@illidian/ytcap
v0.1.0
Published
CLI for fetching YouTube video metadata and transcripts
Maintainers
Readme
ytcap
CLI for fetching YouTube video metadata and transcripts.
Install
npm install
python3 -m pip install --user yt-dlp youtube-transcript-api
npm run buildOn Windows, use py instead of python3 if needed:
npm install
py -m pip install --user yt-dlp youtube-transcript-api
npm run buildUsage
Check local runtime:
node dist/src/index.js doctor --format jsonFetch a video's metadata and transcript:
node dist/src/index.js fetch --url "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --lang en --format jsonGlobal install from npm:
npm install -g @illidian/ytcap --registry https://registry.npmjs.org/The command writes output under youtube-output/<video-id>/:
metadata.jsontranscript.jsontranscript.txt
Proxy
If your machine reaches YouTube through a local proxy, set standard proxy environment variables before running the CLI:
export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890PowerShell:
$env:HTTP_PROXY='http://127.0.0.1:7890'
$env:HTTPS_PROXY='http://127.0.0.1:7890'Commands
ytcap doctor [--format json|table|yaml]
ytcap fetch --url <youtube-url> [--lang <language>] [--output <directory>] [--format json|table|yaml]