Skip to content

Instantly share code, notes, and snippets.

@tung
tung / twitch-vod-chat.py
Last active March 10, 2023 10:34
Download chat from a Twitch VOD and print it to a terminal.
#!/usr/bin/env python3
#
# A script to download chat from a Twitch VOD and print it to a terminal.
# Chat will be downloaded all the way until it ends.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod-chat.py [video_id] [start]
#
# This script could break at any time, because Twitch's chat API is
# undocumented and likes to change at any time; in fact, this script was
@tung
tung / twitch-vod.py
Last active February 27, 2023 02:33
Play Twitch VODs in mpv with chat replay in terminal
#!/usr/bin/env python3
#
# Twitch VOD viewer with terminal chat replay.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod.py https://www.twitch.tv/videos/1234567890 [360p]
#
# Requires mpv and twitch-vod-chat.py - https://gist.github.com/tung/20de3e992ca3a6629843e8169dc0398e
#