From 5ff893ddaf95e9149704bccab2ad2f1c502ac2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Misty=20De=20M=C3=A9o?= Date: Thu, 26 Jun 2025 14:27:13 -0700 Subject: [PATCH] brozzler-new-site: add flag to disable videos This makes it easier to test the new video exclusion work. --- brozzler/cli.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/brozzler/cli.py b/brozzler/cli.py index 55aaa95..c7d6892 100755 --- a/brozzler/cli.py +++ b/brozzler/cli.py @@ -39,6 +39,7 @@ import yaml import brozzler import brozzler.worker from brozzler import suggest_default_chrome_exe +from brozzler.model import VideoCaptureOptions r = rdb.RethinkDB() @@ -500,11 +501,22 @@ def brozzler_new_site(argv=None): default=None, help="use this password to try to log in if a login form is found", ) + arg_parser.add_argument( + "--disable-video-capture", + dest="disable_video", + action="store_true", + help="disable video capture for this site", + ) add_common_options(arg_parser, argv) args = arg_parser.parse_args(args=argv[1:]) configure_logging(args) + if args.disable_video: + video_capture = VideoCaptureOptions.DISABLE_VIDEO_CAPTURE.value + else: + video_capture = VideoCaptureOptions.ENABLE_VIDEO_CAPTURE.value + rr = rethinker(args) site = brozzler.Site( rr, @@ -522,6 +534,7 @@ def brozzler_new_site(argv=None): ), "username": args.username, "password": args.password, + "video_capture": video_capture, }, )