def run(self): start = datetime.datetime.now() log.info("Start Time: {}".format(start)) table = item_crawler.crawl() if (table is not None) and len(table) > 0: suggestion.suggest(table) else: log.error( 'No correct csgo items remain. Please check if conditions are to strict.' ) end = datetime.datetime.now() log.info("END: {}. TIME USED: {}.".format(end, end - start)) self._signal.emit()
praser.add_argument('--console', help="Disable Graphical User Interface", action='store_true', default=False) args = praser.parse_args() if config.CONSOLE or args.console: import datetime from src.crawl import item_crawler from src.util import suggestion from src.util.logger import log start = datetime.datetime.now() log.info("Start Time: {}".format(start)) table = item_crawler.crawl() if (table is not None) and len(table) > 0: suggestion.suggest(table) else: log.error( 'No correct csgo items remain. Please check if conditions are to strict.' ) if args.output is not None: database = [x.to_dict() for x in table] with open(args.output, "w", encoding='utf-8') as f: f.write(json.dumps(database)) end = datetime.datetime.now() log.info("END: {}. TIME USED: {}.".format(end, end - start))