About two years, after my last mention of chk-jtv-lives.sh, it stopped working. My guess is the changes in API versions causing the cease of functioning.

Yesterday, despite I was having some personal issue, I fired up terminal and extracted its Git history so I could move it to its own repository before I started to port it into a Python 3 code and use latest Twitch API v3 /streams.

The code can be found on Gist, chk-jtv-lives.

In the original Bash script, it would use current user’s login name and look for the favorite channels under the same username on Justin.tv/Twitch.tv, but this Python script is no longer doing that. I keep it as simple as possible, since I don’t actually log in on Twitch anymore.

It’s usage is:


usage: chk-jtv-lives.py [-h] CHANNEL [CHANNEL ...]

You give it a list of channel IDs and it returns a result like:

https://cdn.rawgit.com/livibetter/614a080fd08e05d86bb6/raw/651f923333b6983d09a0097da9be705b2bd8ff8a/chk-jtv-lives.py.png

For a quick comparison from old screenshot of ol’ shell script:

https://cdn.rawgit.com/livibetter/614a080fd08e05d86bb6/raw/896daaa192ef220726d3c8925f0529bdb4b88f2b/chk-jtv-lives.sh.png

You can see the currently playing game is added as well as the timestamp in local timezone, the stream uptime is still provided in short form, status is still wrapped.

I saw quite more information could be useful, such as delay and preview images. Although I don’t really think, adding a preview image link would be nice in terminal, perhaps incorporating with Image-to-ASCII conversion would work?

At this moment, I actually use it as an alias with a list of channel IDs after the script name.

chk-jtv-lives is still kept its old license, WTFPL Version 2.