Properly handle quotes and double quotes in the urls.

This commit is contained in:
Relintai 2023-02-10 14:47:05 +01:00
parent 2ca772ec50
commit d829af3d7c
1 changed files with 4 additions and 1 deletions

View File

@ -809,7 +809,10 @@ class ChannelEntry:
files[main_fname] = 1 files[main_fname] = 1
command = "yt-dlp " + l["cmdparams"] + " -o './" + self.video_output_dir + "/" + main_fname + ".%(ext)s' " + s["url"] url_escaped = s["url"].replace("'", "\\'")
url_escaped = url_escaped.replace('"', '\\"')
command = "yt-dlp " + l["cmdparams"] + " -o './" + self.video_output_dir + "/" + main_fname + ".%(ext)s' " + url_escaped
command_outfile.write(command + "\n") command_outfile.write(command + "\n")