From 6e938857d437400e8c5a999b60ff74523df29613 Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 14 May 2026 21:21:43 +0930 Subject: [PATCH] Add ability to specify download directory --- autograbber.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/autograbber.py b/autograbber.py index 6d2dc16..e9f9401 100755 --- a/autograbber.py +++ b/autograbber.py @@ -272,9 +272,10 @@ def parse_args(): ) parser.add_argument( - "--downloads", + "-d", "--downloads", + dest="downloads", default="./downloads", - help="Download directory" + help="Directory where videos will be saved." ) parser.add_argument( @@ -293,8 +294,15 @@ if __name__ == "__main__": args = parse_args() + # Convert to Path object and ensure it exists + download_path = Path(args.downloads).resolve() + + if not args.dry_run and not download_path.exists(): + print(f"📂 Creating download directory: {download_path}") + download_path.mkdir(parents=True, exist_ok=True) + AutoGrabber( - download_dir=args.downloads, + download_dir=download_path, dry_run=args.dry_run, mark_existing=args.mark_existing ).run()