https://github.com/markkoz/twitch-alarm
Sounds an alarm when a Twitch stream goes live.
https://github.com/markkoz/twitch-alarm
alarm python python-3 twitch twitch-tv
Last synced: about 1 year ago
JSON representation
Sounds an alarm when a Twitch stream goes live.
- Host: GitHub
- URL: https://github.com/markkoz/twitch-alarm
- Owner: MarkKoz
- License: mit
- Created: 2017-12-20T12:29:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T08:13:18.000Z (about 7 years ago)
- Last Synced: 2025-02-01T00:25:00.659Z (over 1 year ago)
- Topics: alarm, python, python-3, twitch, twitch-tv
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitch Alarm
Sounds an alarm when a Twitch stream goes live.
### Requirements
* [Python 3.6](https://www.python.org/downloads/) or higher
* [requests](http://docs.python-requests.org/en/master/)
* [pyaudio](https://people.csail.mit.edu/hubert/pyaudio/)
* [python-dateutil](https://dateutil.readthedocs.io/en/stable/)
### Configuration
A `JSON` file named `configuration.json` in the same directory as `main.py` is
used for configuration of the program. It has the following format:
```json
{
"clientID": "",
"channels": [
"ChannelName1",
"ChannelName2"
],
"frequency": 60,
"sound": "path/to/alarm/sound.wav"
}
```
* clientID - The Twitch application's client ID. Register the application
[here](https://dev.twitch.tv/dashboard/apps).
* channels - A list of the names of channels for which an alarm will sound when
live.
* frequency - The interval between live checks in seconds. Note the endpoint
for streams has a rate limit of 30 requests per minute.
* sound - Path to a `wav` audio file that will be used as the alarm sound.
### Usage
Run `main.py`. If a channel goes live, an alarm will sound. The alarm will stop
after any key + Enter is pressed and the program will close; re-run
`Main.py` to restart the program.