Monitor for when a channel goes live and download it automatically
Go to file
2024-04-10 16:44:57 -04:00
.gitignore Now read the channel list from the config.ini 2024-04-08 16:34:28 -04:00
config.ini Start to read the config file 2024-04-05 15:54:40 -04:00
config.ini.example Better way to handle logging 2024-04-10 16:44:57 -04:00
LICENSE Add LICENSE 2024-04-03 21:00:48 +00:00
main.py Better way to handle logging 2024-04-10 16:44:57 -04:00
README.md Better way to handle logging 2024-04-10 16:44:57 -04:00
requirements.txt Should maybe make requests a requirement 2024-04-06 23:47:07 -04:00

Auto TTV Grabber

tl;dr

This script relies on streamlink being installed. You can find all of its requirements on the their project page. This script loops through all of the channels in config.ini, once per minute checking to see if the channel is live via a HTTP request. Once a channel is live a streamlink subprocess spawns in the background, downloading the stream to it's default location ($HOME/Downloads/Stream/<channel_name>) If you wish to change this location, you can find out how to below

Configuration

You can copy config.ini.example from the repo to config.ini to begin. Leaving a setting blank will render it being ignored and using the default value.

Settings

  • streamlink_location: If streamlink is not in your path you can specify its absolute location here. Otherwise it looks for it in your path.
  • download_location: You can specify the absolute path to where you would like to save the steams. A subdirectory will be created for each channel as it goes live. If left blank the default location is: $HOME/Downloads/Streams/<channel_name>
  • skip_ads : Takes a True or False value. If True you will need to have installed the ttvlol streamlink plugin. Setting this to True without doing so will cause the streamlink subprocess to fail. Default value is False
  • log : Takes a True or False value. If True there will be a log.txt file in the channel's download directory with all of the output that came from its corresponding subprocess. Default value is False

Adding streams

You will need to add the channels Twitch username to config.ini:

[streams]
1 = coney
2 = dougdoug
3 = parkzer

As for as I know there is no limit to how many streams you can add this way, just make sure when you add a new stream it is incremented by one