1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-27 01:56:52 +00:00

Allow comments in batch file.

This commit is contained in:
Nevar Angelo 2010-11-06 22:21:45 +02:00
parent 8cc4434116
commit 817e8f523f

View file

@ -2212,7 +2212,7 @@ if __name__ == '__main__':
batchfd = open(opts.batchfile, 'r') batchfd = open(opts.batchfile, 'r')
batchurls = batchfd.readlines() batchurls = batchfd.readlines()
batchurls = [x.strip() for x in batchurls] batchurls = [x.strip() for x in batchurls]
batchurls = [x for x in batchurls if len(x) > 0] batchurls = [x for x in batchurls if len(x) > 0 and not re.search(r'^[#/;]', x)]
except IOError: except IOError:
sys.exit(u'ERROR: batch file could not be read') sys.exit(u'ERROR: batch file could not be read')
all_urls = batchurls + args all_urls = batchurls + args