mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 19:07:52 +00:00
oops no hardcoding
This commit is contained in:
@@ -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 == "":
|
||||
|
||||
Reference in New Issue
Block a user