A Reddit bot which polls Twitch.tv streams and updates a subreddit's sidebar with their current statuses.
config.sample.conf
to config.conf
.config.conf
and fill in the required fields.Add the following code snippet in your subreddit's sidebar where you want the stream list to be printed.
[](#BOT_STREAMS)[](/BOT_STREAMS)
These are empty links, so they won't show up on the page, but the bot will be able to see them and add text between them.
./twitchbot
. It will use a configuration file
named config.conf
by default, or you can run it as ./twitchbot other_config.conf
to useThis bot outputs stream information according to a user specified
format. The template
value is printed for each active stream, with
the following substitutions made:
These values: | Will be replaced with this data: |
---|---|
$name | The channel name |
$viewers | The number of active viewers |
$title | The current title of the stream |
$link | The URL of the stream |
$icon | The URL of the streamer's 300x300 icon |
$banner | The URL of the streamer's banner |
Also, all Python escape sequences are supported in template
,
header
, footer
, separator
, and no_streams
.
All code is PEP8 compliant.