mirror of
https://github.com/anatolykopyl/youtube-cdl.git
synced 2026-03-26 12:55:11 +00:00
✨ Added download_archive argument
This commit is contained in:
4
main.py
4
main.py
@@ -42,6 +42,8 @@ parser.add_argument('-a', '--all', action='store_true',
|
|||||||
help='Download all subscriptions.')
|
help='Download all subscriptions.')
|
||||||
parser.add_argument('-f', '--format', action='store', type=str, default='best',
|
parser.add_argument('-f', '--format', action='store', type=str, default='best',
|
||||||
help='Format to pass to youtube-dl. (default: best)')
|
help='Format to pass to youtube-dl. (default: best)')
|
||||||
|
parser.add_argument('--download_archive', action='store', type=str,
|
||||||
|
help='Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it.')
|
||||||
|
|
||||||
# oauth2client.tools.run_flow arguments
|
# oauth2client.tools.run_flow arguments
|
||||||
parser.add_argument('--auth_host_name', action='store', type=str, default='localhost',
|
parser.add_argument('--auth_host_name', action='store', type=str, default='localhost',
|
||||||
@@ -57,6 +59,7 @@ json_input = args.input
|
|||||||
output_dir = args.output or 'output'
|
output_dir = args.output or 'output'
|
||||||
download_all = args.all
|
download_all = args.all
|
||||||
dl_format = args.format
|
dl_format = args.format
|
||||||
|
dl_archive = args.download_archive
|
||||||
|
|
||||||
c = Console()
|
c = Console()
|
||||||
|
|
||||||
@@ -78,6 +81,7 @@ def prg_hook(d):
|
|||||||
|
|
||||||
ydl_opts = {
|
ydl_opts = {
|
||||||
'format': dl_format,
|
'format': dl_format,
|
||||||
|
'download_archive': dl_archive,
|
||||||
'ignoreerrors': True,
|
'ignoreerrors': True,
|
||||||
'continuedl': True,
|
'continuedl': True,
|
||||||
'quiet': True,
|
'quiet': True,
|
||||||
|
|||||||
Reference in New Issue
Block a user