def huban_user(member_id, username, password, proxy): site = Pixiv(member_id, username, password, proxy=proxy) downloader = Downloader(fetcher=site.fetcher, save_dir=site.dir_name) downloader.add_task( site.tasks ) pk_logger.info("All task add...waiting for execution...") try: downloader.join() except KeyboardInterrupt: pk_logger.warn("Exiting...Press crtl+c again to force quit") downloader.stop() exit(0) else: pk_logger.info("All task done...Enjoy!")
def huban_board(url): site = HuaBanBoard(url) downloader = Downloader(fetcher=site.fetcher, save_dir=site.dir_name) downloader.add_task( site.tasks ) pk_logger.info("All task add...waiting for execution...") try: downloader.join() except KeyboardInterrupt: pk_logger.warn("Exiting...Press crtl+c again to force quit") downloader.stop() exit(0) else: pk_logger.info("All task done...Enjoy!")