mirror of
https://github.com/anatolykopyl/youtube-cdl.git
synced 2026-03-26 12:55:11 +00:00
✨ Format selection argument
This commit is contained in:
5
main.py
5
main.py
@@ -41,12 +41,15 @@ parser.add_argument('-o', '--output', action='store', type=str,
|
||||
help='Output folder.')
|
||||
parser.add_argument('-a', '--all', action='store_true',
|
||||
help='Download all subscriptions.')
|
||||
parser.add_argument('-f', '--format', action='store', type=str, default='best',
|
||||
help='Format to pass to youtube-dl. (default: best)')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
json_input = args.input
|
||||
output_dir = args.output or 'output'
|
||||
download_all = args.all
|
||||
dl_format = args.format
|
||||
|
||||
c = Console()
|
||||
|
||||
@@ -65,7 +68,7 @@ def prg_hook(d):
|
||||
|
||||
|
||||
ydl_opts = {
|
||||
'format': 'best',
|
||||
'format': dl_format,
|
||||
'ignoreerrors': True,
|
||||
'continuedl': True,
|
||||
'quiet': True,
|
||||
|
||||
Reference in New Issue
Block a user