TwitchTimer Script Improvements
We’re essentially done with our project since we’ve successfully connected to a broadcasting Twitch channel, opened VLC, and closed VLC and the stream after a set duration of time. But our script isn’t very robust. For example, try running the script without passing a numeric value (or even no value at all). It will fail to run, reporting either a ValueError or IndexError depending on what was or wasn’t passed as an argument.
Also, while MST3K provides a continuous stream of entertainment on their Twitch channel, it isn’t the only broadcaster on Twitch. It would be convenient if we could pass another argument to our script indicating which channel we’d like to watch for how long. Fortunately, we’re not the only ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access