diff --git a/scripts/channel_to_redis.py b/scripts/channel_to_redis.py index c4814ff..4f10e25 100644 --- a/scripts/channel_to_redis.py +++ b/scripts/channel_to_redis.py @@ -5,7 +5,7 @@ from yt_dlp import YoutubeDL import sys if len(sys.argv) < 2: - raise Exception("Expected path to file as argument") + raise Exception("Expected youtube playlist/channel/video") config_path = sys.argv[1] @@ -17,7 +17,7 @@ file = open(config_path, "r") youtube_dl_opts = {} -vid_urls = subprocess.run(["yt-dlp", "--print", "id", "https://www.youtube.com/playlist?list=PLM2V-zC1RStc1TttVrVXCTQ5AW_jN0fFS"], capture_output=True).stdout.decode("utf-8") +vid_urls = subprocess.run(["yt-dlp", "--print", "id", f"{sys.argv[1]}"], capture_output=True).stdout.decode("utf-8") for vid_url in vid_urls.split("\n"): if vid_url == "":