mirror of
https://github.com/janLo/punkow
synced 2026-06-19 15:38:00 +00:00
Less verbose service
This commit is contained in:
@@ -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')
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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")}
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user