Last active
May 13, 2022 18:35
-
-
Save hbouhadji/47b6bc12f8b0551feb0b4062a03d619b to your computer and use it in GitHub Desktop.
twitch vod viewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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