diff --git a/main.py b/main.py old mode 100644 new mode 100755 index cc4b1cb..bfad616 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ import requests import os import sys import shutil +from datetime import datetime channel_list = [] downloading = [] @@ -43,20 +44,23 @@ while True: # Exits the program if there is no channels to Grab if not channel_list: sys.exit("Please populate the channel_list.txt with one channel per line!") + print("\n------------------------------------") for channel in channel_list: channel = channel.strip() contents = requests.get("https://www.twitch.tv/" + channel).content.decode( "utf-8" ) if "isLiveBroadcast" in contents: - print(channel + " is live!") + print("\033[1m" + channel + "\033[0m is \033[32mlive\033[0m!") if channel not in downloading: download_stream(channel) else: print(channel + " is already downloading") else: - print(channel + " is not live.") + print(channel + " is \033[31mnot live\033[0m.") if channel in downloading: downloading.remove(channel) print(channel + " is no longer downloading") + print("\n\033[3mLast checked: " + datetime.now().strftime("%H:%M:%S") + "\033[0m") + print("------------------------------------") time.sleep(60) # Wait 60 Seconds before trying again