From d1588c1156fbb365bc62f6279f3a8cd74f65ceb1 Mon Sep 17 00:00:00 2001 From: ngosang Date: Thu, 3 Aug 2023 05:45:38 +0200 Subject: [PATCH] Remove misleading stack trace when a button is not found --- src/flaresolverr_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/flaresolverr_service.py b/src/flaresolverr_service.py index 5541242..6911360 100644 --- a/src/flaresolverr_service.py +++ b/src/flaresolverr_service.py @@ -264,8 +264,8 @@ def click_verify(driver: WebDriver): actions.click(checkbox) actions.perform() logging.debug("Cloudflare verify checkbox found and clicked!") - except Exception as e: - logging.debug("Cloudflare verify checkbox not found on the page. Error: " + str(e)) + except Exception: + logging.debug("Cloudflare verify checkbox not found on the page.") finally: driver.switch_to.default_content() @@ -281,8 +281,8 @@ def click_verify(driver: WebDriver): actions.click(button) actions.perform() logging.debug("The Cloudflare 'Verify you are human' button found and clicked!") - except Exception as e: - logging.debug("The Cloudflare 'Verify you are human' button not found on the page. Error: " + str(e)) + except Exception: + logging.debug("The Cloudflare 'Verify you are human' button not found on the page.") time.sleep(2)