12

Let's suppose you want to make a long list of Urls but separated with a comment which

indicates what the Urls are about. Is there a way to do it?

Braiam
  • 67,791
  • 32
  • 179
  • 269
user240029
  • 123
  • 1
  • 5

4 Answers4

13

youtube -dl supports only one url at each line in a url listed batch file. It will not read a url/line if it begins with a # or part of line after #. In that case your batch file should look like,

#comment 1
https://www.youtube.com/watch?v=foo
#commeent 2 
https://www.youtube.com/watch?v=bar

You can comment like this also,

https://www.youtube.com/watch?v=foo #comment 1
https://www.youtube.com/watch?v=bar #comment 2

To download with such a batch file, use

youtube-dl --title --batch-file='/path/to/list.txt'

I assume list.txt contains the urls.

sourav c.
  • 44,715
8

Create your batch file with a url-list as usual. And comment a line by putting a # at the beginning of the line.

youtube-dl will not read that line.

Example: url.txt

#This is link 1
youtube.com/watch=url
#This is link 2 (blabla)
youtube.com/watch=url
Braiam
  • 67,791
  • 32
  • 179
  • 269
MrVaykadji
  • 5,875
  • 2
  • 32
  • 55
5

You can comment them just the way you'd comment them in bash. Just put a # before the comment. You can have a text file like this.

#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
Ufoguy
  • 1,268
  • 3
  • 13
  • 23
4

You can comment a line by putting a # or a ; at the beginning of the line. Both will work.

falconer
  • 15,026
  • 3
  • 48
  • 68