diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-05-01 10:37:08 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-05-04 16:00:05 +0200 |
commit | eb818f0c6eb86461a0db1845876f2a0b39b99b7f (patch) | |
tree | 2b25cb248e4a2aca0577a336f48ae112c7e54408 /crocoite/cli.py | |
parent | d8193765df85293f825abc486ac5cb1f5ac0a028 (diff) | |
download | crocoite-eb818f0c6eb86461a0db1845876f2a0b39b99b7f.tar.gz crocoite-eb818f0c6eb86461a0db1845876f2a0b39b99b7f.tar.bz2 crocoite-eb818f0c6eb86461a0db1845876f2a0b39b99b7f.zip |
behavior: Add link extraction script
Diffstat (limited to 'crocoite/cli.py')
-rw-r--r-- | crocoite/cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |