mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-12-09 22:05:32 -05:00
brozzler-new-site: add flag to disable videos
This makes it easier to test the new video exclusion work.
This commit is contained in:
parent
38f164dbc4
commit
5ff893ddaf
1 changed files with 13 additions and 0 deletions
|
|
@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue