def main(): # log settings # log format logging.basicConfig(level=logging.DEBUG, format='%(asctime)s [%(module)10s] [%(levelname)5s] %(message)s') # log level for http request class logging.getLogger("requests").setLevel(logging.WARNING) # log level for main pgoapi class logging.getLogger("pgoapi").setLevel(logging.INFO) # log level for internal pgoapi class logging.getLogger("rpc_api").setLevel(logging.INFO) config = init_config() if not config: return if config.debug: logging.getLogger("requests").setLevel(logging.DEBUG) logging.getLogger("pgoapi").setLevel(logging.DEBUG) logging.getLogger("rpc_api").setLevel(logging.DEBUG) bot = PokemonGoBot(config) bot.start() while(True): bot.take_step()
def main(): # log settings # log format logging.basicConfig(level=logging.DEBUG, format='%(asctime)s [%(module)10s] [%(levelname)5s] %(message)s') # log level for http request class logging.getLogger("requests").setLevel(logging.WARNING) # log level for main pgoapi class logging.getLogger("pgoapi").setLevel(logging.INFO) # log level for internal pgoapi class logging.getLogger("rpc_api").setLevel(logging.INFO) # log level for flash server logging.getLogger("werkzeug").setLevel(logging.ERROR) config = init_config() if not config: return if config.debug: logging.getLogger("requests").setLevel(logging.DEBUG) logging.getLogger("pgoapi").setLevel(logging.DEBUG) logging.getLogger("rpc_api").setLevel(logging.DEBUG) global visualisation_data bot = PokemonGoBot(config, visualisation_data) bot.start() while(True): try: bot.take_step() except: print('Oops, Exception, have a rest then.') time.sleep(2)
def main(): # log settings # log format #logging.basicConfig(level=logging.DEBUG, format='%(asctime)s [%(module)10s] [%(levelname)5s] %(message)s') # @eggins clean log print('[x] Initializing PokemonGO Bot v1.0') time.sleep(1) print('[x] PokemonGo Bot [@PokemonGoF | @eggins | @crack00r | @ethervoid | /r/pokemongodev]') config = init_config() if not config: return if config.debug: # log level for http request class logging.getLogger("requests").setLevel(logging.WARNING) # log level for main pgoapi class logging.getLogger("pgoapi").setLevel(logging.INFO) # log level for internal pgoapi class logging.getLogger("rpc_api").setLevel(logging.INFO) if config.debug: logging.getLogger("requests").setLevel(logging.DEBUG) logging.getLogger("pgoapi").setLevel(logging.DEBUG) logging.getLogger("rpc_api").setLevel(logging.DEBUG) print('[x] Configuration Initialized') bot = PokemonGoBot(config) bot.start() while(True): bot.take_step()
def main(): # log settings # log format #logging.basicConfig(level=logging.DEBUG, format='%(asctime)s [%(module)10s] [%(levelname)5s] %(message)s') sys.stdout = getwriter('utf8')(sys.stdout) sys.stderr = getwriter('utf8')(sys.stderr) # @eggins clean log print '[x] Initializing PokemonGO Bot v1.0' sleep(1) print '[x] PokemonGo Bot [@PokemonGoF | @eggins | @crack00r | @ethervoid | /r/pokemongodev]' config = init_config() if not config: return if config.debug: # log level for http request class logging.getLogger("requests").setLevel(logging.WARNING) # log level for main pgoapi class logging.getLogger("pgoapi").setLevel(logging.INFO) # log level for internal pgoapi class logging.getLogger("rpc_api").setLevel(logging.INFO) if config.debug: logging.getLogger("requests").setLevel(logging.DEBUG) logging.getLogger("pgoapi").setLevel(logging.DEBUG) logging.getLogger("rpc_api").setLevel(logging.DEBUG) print '[x] Configuration Initialized' try: bot = PokemonGoBot(config) bot.start() while True: bot.take_step() except KeyboardInterrupt: print '[ USER ABORTED, EXITING.. ]'
try: bot = PokemonGoBot(config) bot.start() logger.log('[x] Starting PokemonGo Bot....', 'green') <<<<<<< HEAD print '[x] Configuration Initialized' try: bot = PokemonGoBot(config) bot.start() while True: bot.take_step() except KeyboardInterrupt: print '[ USER ABORTED, EXITING.. ]' ======= while True: bot.take_step() except KeyboardInterrupt: logger.log('[x] Exiting PokemonGo Bot', 'red') # TODO Add number of pokemon catched, pokestops visited, highest CP # pokemon catched, etc. >>>>>>> upstream/master if __name__ == '__main__': main()