Skip to content

Saturn/twitch-stream-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch Stream Alerts

Twitch V5 API (kraken) has been deprecated and will be shut down on December 31st 2018. The new API does not return the same amount of data so this script cannot easily be updated. The Twitch mobile apps now support push notifications for when streams come online so it is now unnecessary anyway.

Simple script that sends Pushbullet notifications when a Twitch.tv stream you specify comes online.

The script will keep a record of the streams it records and only alert you when a stream is 'newly online'.

Once a stream goes offline it will still keep a record of it for a while. This is because often a stream will go offline briefly and come back. In this situation you would not want to recieve a fresh push notification.

One push alert per stream.

Designed to be ran via cron. Currently Python 2.7 only.

Installation

git clone https://github.com/Saturn/twitch-stream-alerts.git

Config

You need to have a Twitch Client ID in order to use the Twitch API. Read more here https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843

TWITCH_CLIENT_ID

PUSHBULLET_API_KEY

PUSHBULLET_IDEN_KEY (optional)

To obtain an API key please visit https://www.pushbullet.com/#settings/account

An iden_key is optional. Without one it will simply push to all of your devices.

To obtain a connected device's iden key:

curl --header 'Access-Token: <PUSHBULLET_API_KEY>' \
https://api.pushbullet.com/v2/devices

Cron

A possible cron configuration:

*/5 * * * * cd ~/twitch_stream_alerts && /usr/bin/python alert.py >/dev/null 2>&1

It will check every five minutes.

Todo

About

Get pushbullet notification when twitch streams comes online

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages