Updated documentation and changed array joining method
This commit is contained in:
parent
7c40a56cb4
commit
260ce979c7
16
dlaudio.py
16
dlaudio.py
@ -1,10 +1,10 @@
|
|||||||
#!/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
|
=====
|
||||||
Imports:
|
Usage
|
||||||
argparse: for parsing command line arguments
|
=====
|
||||||
subprocess: for running youtube-dl
|
>>> dlaudio -f flac -n something "www.youtube.com"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
@ -19,7 +19,7 @@ parser.add_argument('-b', '--batch-dl',
|
|||||||
parser.add_argument('-f', '--format',
|
parser.add_argument('-f', '--format',
|
||||||
type=str,
|
type=str,
|
||||||
default='ogg',
|
default='ogg',
|
||||||
help='the format to use (default:flac)')
|
help='the format to use (default:ogg)')
|
||||||
parser.add_argument('-n', '--filename',
|
parser.add_argument('-n', '--filename',
|
||||||
type=str,
|
type=str,
|
||||||
help='the name of the downloaded file (without extension)')
|
help='the name of the downloaded file (without extension)')
|
||||||
@ -57,4 +57,4 @@ elif len(args.urls) == 0:
|
|||||||
else:
|
else:
|
||||||
dl_opts += args.urls
|
dl_opts += args.urls
|
||||||
|
|
||||||
dl = subprocess.run(['youtube-dl'] + dl_opts)
|
dl = subprocess.run(['youtube-dl'].extend(dl_opts))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user