mirror of
https://github.com/anatolykopyl/youtube-cdl.git
synced 2026-03-26 04:45:11 +00:00
✨ Format selection argument
This commit is contained in:
@@ -52,6 +52,11 @@ python main.py
|
||||
python main.py
|
||||
```
|
||||
|
||||
* Specify format [like in youtube-dl](https://github.com/ytdl-org/youtube-dl#user-content-format-selection-examples):
|
||||
```bash
|
||||
python main.py -f 'bestaudio/best'
|
||||
```
|
||||
|
||||
* Download all the videos from all channels you're subscribed to:
|
||||
```bash
|
||||
python main.py -a
|
||||
|
||||
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