Less verbose service

This commit is contained in:
Jan Losinski 2019-01-07 15:05:38 +01:00
parent a03bee6268
commit e70c676d42
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ parser.add_argument("--interval", default=30, type=int, help="The interval the b
if __name__ == "__main__": if __name__ == "__main__":
logging.basicConfig( logging.basicConfig(
level=logging.INFO, level=logging.DEBUG,
format='%(asctime)s %(levelname)s: %(message)s', format='%(asctime)s %(levelname)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S') datefmt='%Y-%m-%d %H:%M:%S')

View File

@ -191,7 +191,7 @@ class BookingService(object):
logger.error("Cannot find success message") logger.error("Cannot find success message")
return False return False
logger.info("Success: %s", success.text.strip()) logger.debug("Success: %s", success.text.strip())
result = {key: register_html.find("span", {"class": f"summary_{key}"}).text.strip() result = {key: register_html.find("span", {"class": f"summary_{key}"}).text.strip()
for key in ("name", "mail", "authKey", "processId")} for key in ("name", "mail", "authKey", "processId")}

View File

@ -55,7 +55,7 @@ def _book(target: str, reqs: typing.List[_WorkerRequest], debug=False) -> typing
if target.startswith(scraper.BASE_URL): if target.startswith(scraper.BASE_URL):
target = target[len(scraper.BASE_URL):] target = target[len(scraper.BASE_URL):]
logger.info("Try to book %d appointments for %s", len(reqs), target) logger.debug("Try to book %d appointments for %s", len(reqs), target)
booked_ids = [] booked_ids = []
try: try: