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 ...

Get Portable Python Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.