import click import mongocrawler @click.group() def cli(): pass @cli.command() def createdb(): mongocrawler.createdb() @cli.command() @click.argument("link") def parseurl(link): mongocrawler.parseurl(link) @cli.command() @click.argument("link") def externaldomains(link): mongocrawler.externaldomains(link) @cli.command() @click.argument("start_link") def classify(start_link): mongocrawler.classify(start_link) @cli.command() @click.argument("start_link") def visit(start_link): mongocrawler.visit(start_link) if __name__ == "__main__": cli()