From eb818f0c6eb86461a0db1845876f2a0b39b99b7f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 1 May 2018 10:37:08 +0200 Subject: behavior: Add link extraction script --- crocoite/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crocoite/cli.py') diff --git a/crocoite/cli.py b/crocoite/cli.py index cac5b3b..4cbce4a 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -22,7 +22,7 @@ Command line interface """ -import logging, argparse +import logging, argparse, json, sys from . import behavior from .controller import SinglePageController, defaultSettings, ControllerSettings @@ -68,7 +68,8 @@ def main (): timeout=args.timeout) with open (args.output, 'wb') as fd: controller = SinglePageController (args.url, fd, settings=settings) - controller.run () + r = controller.run () + json.dump (r, sys.stdout) return True -- cgit v1.2.3