added 'only' option
This commit is contained in:
parent
e5501fb859
commit
f1100092b9
10
dl.py
10
dl.py
@ -13,8 +13,11 @@ def parse_args():
|
||||
help='Output directory', default='./out')
|
||||
parser.add_argument('--starter-url', type=str,
|
||||
help='Starter URL', default="https://www.fau.tv/auth/sso")
|
||||
|
||||
parser.add_argument('--start-at', type=int,
|
||||
help='Skip all previous indices (defaults to 1)', default=1)
|
||||
help='Skip all previous indices (index starts at 1)', default=1)
|
||||
parser.add_argument('--only', type=int,
|
||||
help='Only download the given index')
|
||||
|
||||
parser.add_argument('--auth-token', type=str)
|
||||
parser.add_argument('--session-id', type=str)
|
||||
@ -37,7 +40,10 @@ def main():
|
||||
os.makedirs(args.out_dir, exist_ok=True)
|
||||
|
||||
for index, clip_id in enumerate(get_course_clip_ids(args.course_id)):
|
||||
if index < args.start_at - 1:
|
||||
if args.only is not None:
|
||||
if index != args.only - 1:
|
||||
continue
|
||||
elif index < args.start_at - 1:
|
||||
continue
|
||||
|
||||
download_clip(
|
||||
|
Loading…
x
Reference in New Issue
Block a user