Ttvsnap
Save Twitch screenshots using Twitch API preview thumbnails
Install / Use
/learn @chfoo/TtvsnapREADME
ttvsnap
Ttvsnap is script that will periodically save Twitch.tv screenshots using Twitch API preview thumbnails.
Usage
You will need Python 3.3+.
To start the script, run something similar to this:
python3 ttvsnap.py verycoolstreamer ./screenshots/ --client-id YOUR_CLIENT_ID_HERE --client-secret-file FILENAME_TO_A_TEXT_FILE_WITH_CLIENT_SECRET --cache-dir PATH_TO_A_DIRECTORY_FOR_TEMP_SECRETS
(Replace python3 as needed, python.exe for example.)
The script will check every ~5 minutes and save the screenshot to the given directory. For streams that run 24/7, you can use the --subdir option to create a directory for each day.
As a convenience, it supports generating thumbnails using ImageMagick. Ensure that the convert command exists and add the --thubmnail option.
For the list of options, use the --help option.
Tips
If you are using this script for a website of some sort, you may want to look into some daemon service management tools to restart it if it crashes. On Linux, look into creating Upstart or Systemd configuration files for it.
As of writing, Twitch caches preview images for 5 minutes so setting it to low values such as 1 minute may be useless. However, the script will use the If-Modified-Since HTTP header to avoid downloading images repeatedly.
Client ID is required after 2016-08-08. You can get a Client ID in the Dev Console page by registering an application and using the Client ID for personal use. Client secret is required after 2020-04-30. Click generate new secret and keep the secret in a safe place.
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
