gpt4 book ai didi

youtube - Youtube-dl输出模板%(title)s。%(ext)s无法在Windows中使用set/p

转载 作者:行者123 更新时间:2023-12-03 05:53:13 25 4
gpt4 key购买 nike

我使用命令批处理文件:
set / p ytlink =“输入YouTube视频的链接:-”
youtube-dl -f“bestvideo [height <= 1080] + bestaudio / best [height <= 1080]” -o“D:\ Videos \%(title)s。%(ext)s”%ytlink%
暂停

但输出文件名为(ext)s.webm ,似乎cmd正在中处理%(title)s。% -o“D:\ Videos \%(title)s。%(ext)s “作为变量。那么如何获取视频标题?
操作系统= Windows 10 64bit 1909
youtube-dl = 2020.01.24

最佳答案

您必须在批处理文件中使用double%。

   set /p ytlink="Enter the link of Youtube Video:- "
youtube-dl -f "bestvideo[height<=1080]+bestaudio/best[height<=1080]" -o "D:\Videos\%%(title)s.%%(ext)s" %ytlink%
pause

关于youtube - Youtube-dl输出模板%(title)s。%(ext)s无法在Windows中使用set/p,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59988630/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com