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