有没有办法在 youtube-dl 批处理文件中添加评论?

use*_*029 10 youtube-dl

假设您想制作一长串网址但用注释分隔

指示URL是关于什么的。有没有办法做到这一点?

sou*_* c. 10

youtube -dl在 url 列出的批处理文件中的每一行只支持一个 url。如果它与一个开始,它不会读取URL /线#后或线的一部分#。在这种情况下,您的批处理文件应如下所示,

#comment 1
https://www.youtube.com/watch?v=foo
#commeent 2 
https://www.youtube.com/watch?v=bar
Run Code Online (Sandbox Code Playgroud)

你也可以这样评论,

https://www.youtube.com/watch?v=foo #comment 1
https://www.youtube.com/watch?v=bar #comment 2
Run Code Online (Sandbox Code Playgroud)

要使用这样的批处理文件下载,请使用

youtube-dl --title --batch-file='/path/to/list.txt'
Run Code Online (Sandbox Code Playgroud)

我假设list.txt包含网址。


MrV*_*dji 7

像往常一样使用 url-list 创建批处理文件。并通过放置一个注释一行#在行的开头一行。

youtube-dl 不会读取该行。

例子: url.txt

#This is link 1
youtube.com/watch=url
#This is link 2 (blabla)
youtube.com/watch=url
Run Code Online (Sandbox Code Playgroud)


Ufo*_*guy 5

您可以像在 bash 中注释它们一样注释它们。#就在评论前加个吧。您可以拥有这样的文本文件。

#This is a comment
# I hope people are not tasty
https://www.youtube.com/watch?v=qWAF9PgDg2c #Would we eat each other if it were legal
#I love the moon
https://www.youtube.com/watch?v=Bbgz4yY-xX0   #This is a comment too
Run Code Online (Sandbox Code Playgroud)