Fixed NoneType bug and code cleanup
This commit is contained in:
parent
9e23b0b88a
commit
ceb544b7c6
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
"""Download audio using youtube-dl, passing
|
||||
a specific set of options specified by the user.
|
||||
|
||||
=====
|
||||
Usage
|
||||
=====
|
||||
@ -11,6 +12,7 @@ import argparse
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-b', '--batch-dl',
|
||||
dest='batchfile',
|
||||
@ -55,6 +57,6 @@ elif len(args.urls) == 0:
|
||||
print("URLs are required")
|
||||
exit(2)
|
||||
else:
|
||||
dl_opts += args.urls
|
||||
dl_opts.extend(args.urls)
|
||||
|
||||
dl = subprocess.run(['youtube-dl'].extend(dl_opts))
|
||||
dl = subprocess.run(['youtube-dl'] + dl_opts)
|
||||
|
Loading…
x
Reference in New Issue
Block a user