rg3 / youtube-dl (http://bitbucket.org/rg3/youtube-dl/wiki/)

youtube-dl is a small command-line program for downloading videos from YouTube.com.

Clone this repository (size: 218.9 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/rg3/youtube-dl/
commit 101: 8773bbf4bf57
parent 100: 49f4edb5ebc1
branch: default
Skip blank lines in batch file -- fixes issue #9
rg3
10 months ago

Changed (Δ85 bytes):

raw changeset »

youtube-dl (3 lines added, 1 lines removed)

Up to file-list youtube-dl:

@@ -997,7 +997,9 @@ if __name__ == '__main__':
997
997
		batchurls = []
998
998
		if opts.batchfile is not None:
999
999
			try:
1000
				batchurls = [line.strip() for line in open(opts.batchfile, 'r')]
1000
				batchurls = open(opts.batchfile, 'r').readlines()
1001
				batchurls = [x.strip() for x in batchurls]
1002
				batchurls = [x for x in batchurls if len(x) > 0]
1001
1003
			except IOError:
1002
1004
				sys.exit(u'ERROR: batch file could not be read')
1003
1005
		all_urls = batchurls + args