From 5c882d09bb963b6d1a3af14168c975361be31c8d Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 12 Jul 2023 17:08:01 +0100 Subject: make cid a positional argument walker.py [the cid] rather than walker.py -cid [the cid] --- walker.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/walker.py b/walker.py index f32a6e7..a3d7408 100644 --- a/walker.py +++ b/walker.py @@ -8,14 +8,10 @@ import sys from binascii import unhexlify parser = argparse.ArgumentParser() -parser.add_argument('-cid', help='content id, &cid={...}. see url when reading a chapter') +parser.add_argument('cid', help='content id, &cid={...}. see url when reading a chapter') parser.add_argument('-v', '--verbose', help='no progressive download logs on terminal', action="store_true") args = parser.parse_args() -if args.cid == None: - parser.print_help() - sys.exit() - logging.basicConfig(format='[%(levelname)s] %(asctime)s: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO) def start(url, headers): -- cgit v1.2.3-70-g09d2