cli#

Console entry point for ScraperLib.

Every documented way of starting the CLI lands here:

  • scraper --url ... – the console_scripts entry point

  • python -m scraper_lib ... – via scraper_lib.__main__

  • python -m scraper_lib.cli ... – via the __main__ guard below

The flags themselves are defined once, in scraper_lib.ScraperLib.build_arg_parser(), which is also what docs/cli.rst renders. There is no second copy to drift.

scraper_lib.cli.get_parser() → ArgumentParser[source]#

Return the CLI parser.

Used by the .. argparse:: directive in docs/cli.rst so the published page is generated from the real parser instead of being retyped by hand.

scraper_lib.cli.main(argv=None) → None[source]#

Parse argv (default sys.argv[1:]) and run a download session.