def main():
import argparse
parser = argparse.ArgumentParser(description='Listing ids of a (leaf) category')
parser.add_argument('--cid', '-c', type=int, help='taobao cid, e.g. 51106012', required=True)
parser.add_argument('--pool', '-p', action='store_true', help='use gevent pool to boost execution')
parser.add_argument('--num_paths', '-n', type=int, default=2, help='number of paths, default to 2')
parser.add_argument('--max_page', '-m', type=int, default=1, help='max page, default to 1')
option = parser.parse_args()
print('total items: {}'.format(len(test_list(option.cid, option.pool, option.num_paths, option.max_page))))
评论列表
文章目录