Watch your Twitch subs like Netflix
A Netflix-style interface for your Twitch subscriptions, finally making it easy to browse and enjoy new content
-
Create application via Twitch API: https://dev.twitch.tv/docs/api/
-
Create multiple text files:
- clientid.txt: from twitch api
- secret.txt: from twitch api
- login.txt: the logins Twitch accounts you want to see (one per line)
→ token.txt will be generated automatically
python3 twitchflix.pyThe script will generate “videos.json,” which you can run with “web.php” to see the result.
In the “Config” section of the script, you can edit options.
# ====== Config ======
CLIENT_ID_PATH = pathlib.Path("clientid.txt")
CLIENT_SECRET_PATH = pathlib.Path("secret.txt")
TOKEN_PATH = pathlib.Path("token.txt")
LOGINS_PATH = pathlib.Path("login.txt")
OUTPUT_PATH = pathlib.Path("videos.json")
DAYS_BACK = 3
INCLUDE_HIGHLIGHTS = "NO"
MAX_TOKEN_AGE_DAYS = 59
VIDEO_THUMB_SIZE = (1280, 720)
BOX_ART_SIZE = (342, 513)
GENERIC_PLACEHOLDER = "https://static-cdn.jtvnw.net/ttv-static/404_preview-320x180.jpg"if you get the error:
http error for deotoons: HTTP Error 401: Unauthorized
http error for AVAMind: HTTP Error 401: Unauthorized
http error for hardisk: HTTP Error 401: UnauthorizedYour token has expired (+-2 months). To renew it, delete the token.txt file and restart the script. It will generate a new one.
Too impatient to watch Twitch replays (not yet available on YouTube),
I found the interface really complicated, having to watch account by account without a direct view.
This script solves the problem.
Readme generator: https://www.makeareadme.com/

