Skip to content

Instantly share code, notes, and snippets.

@dardo82
Created December 27, 2020 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dardo82/53a69af2d9470800a14f2ad6572baee8 to your computer and use it in GitHub Desktop.
Save dardo82/53a69af2d9470800a14f2ad6572baee8 to your computer and use it in GitHub Desktop.
UnTwitch DLer
#!/bin/sh
CHANNEL="$1"
PHPSESSID="$(curl -s -I "https://untwitch.com/" \
| gawk -F '=|;' '/PHPSESSID/{print $2}')"
VIDEOID="$(curl -s "https://twitchrss.appspot.com/vod/$CHANNEL" \
| gawk -v RS='<|>' -v FS='/' '/\/videos\//{print $5; exit}')"
URL="twitch.tv%2Fvideos%2F$VIDEOID&format=Audio_Only&from=1&to=150"
curl -L "https://untwitch.com/" -d "url=$URL" -H "Cookie: PHPSESSID=$PHPSESSID" -o "$VIDEOID.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment