mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-11-24 21:32:23 +00:00
oops no hardcoding
This commit is contained in:
1 parent
707f908ebf
commit
6658c96615
1 file changed
+2
-2
@@ -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