Download any public vod from Twitch
npm i -g vodtwitch
# pnpm add -g vodtwitch
# with VOD ID
$ vodtwitch 787450673
# private VOD using your OAuth token taken from Twitch when logged in
$ vodtwitch --token 0aze9batw2zc2tj29nl4mywkqgb1kn 787450673
# you can specify an output directory
$ vodtwitch 787450673 -o my/best/vods
# also works with VOD URL
$ vodtwitch https://www.twitch.tv/videos/787450673
# more command options
$ vodtwitch -h
It will save to your current directory as {vodID}.ts
.
import vodtwitch from "vodtwitch";
async function main() {
await vodtwitch(787450673, { outputDir: process.cwd() });
}
main().catch(console.error);