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:
For a quick comparison from old screenshot of ol’ shell script:
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.
Loved this script, but with twitch requiring an oauth token for all api calls its stopped functioning.
ReplyDeleteI've not used this for nearly a year, not really into reading API documentation. You'll have to find someone who is willing to hack this script, or write a new one.
DeleteIf you do find a solution, please do post a link.