Add ability to specify download directory
This commit is contained in:
+11
-3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user