diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2019-06-26 16:44:55 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-06-26 16:47:21 +0200 |
commit | 94be61a303127335eb39b26302392a0f237c3ac1 (patch) | |
tree | 9998581a2c51ff4b65cdfe50f24b0531d62ffef9 /crocoite/cli.py | |
parent | 926b5ac98449764599ff80d99546f8d1f1c438fe (diff) | |
download | crocoite-94be61a303127335eb39b26302392a0f237c3ac1.tar.gz crocoite-94be61a303127335eb39b26302392a0f237c3ac1.tar.bz2 crocoite-94be61a303127335eb39b26302392a0f237c3ac1.zip |
Allow turning off cert validation
Add --insecure switch (shamelessly stolen from CURL) to both, -grab and
-irc.
Diffstat (limited to 'crocoite/cli.py')
-rw-r--r-- | crocoite/cli.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crocoite/cli.py b/crocoite/cli.py index cccf728..3294061 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -74,6 +74,9 @@ def single (): metavar='NAME', nargs='*') parser.add_argument('--warcinfo', help='Add extra information to warcinfo record', metavar='JSON', type=json.loads) + parser.add_argument('-k', '--insecure', + action='store_true', + help='Disable certificate validation') parser.add_argument('url', help='Website URL', type=URL, metavar='URL') parser.add_argument('output', help='WARC filename', metavar='FILE') @@ -85,7 +88,11 @@ def single (): service = Process () if args.browser: service = Passthrough (args.browser) - settings = ControllerSettings (idleTimeout=args.idleTimeout, timeout=args.timeout) + settings = ControllerSettings ( + idleTimeout=args.idleTimeout, + timeout=args.timeout, + insecure=args.insecure, + ) with open (args.output, 'wb') as fd, WarcHandler (fd, logger) as warcHandler: logger.connect (WarcHandlerConsumer (warcHandler)) handler = [StatsHandler (), LogHandler (logger), warcHandler] |