Skip to content

Instantly share code, notes, and snippets.

@hbouhadji
Last active May 13, 2022 18:35
Show Gist options
  • Save hbouhadji/47b6bc12f8b0551feb0b4062a03d619b to your computer and use it in GitHub Desktop.
Save hbouhadji/47b6bc12f8b0551feb0b4062a03d619b to your computer and use it in GitHub Desktop.
twitch vod viewer
#!/bin/bash
twitchVideoId=$(basename $1)
curl -ss --location --request GET "https://api.twitch.tv/kraken/videos/$twitchVideoId" \
--header 'Client-Id: kimne78kx3ncx6brgo4mv6wki5h1ko' \
--header 'Accept: application/vnd.twitchtv.v5+json' \
| jq -r '.animated_preview_url' \
| sed 's/\/storyboards.*/\/chunked\/index-dvr.m3u8/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment