From 0620644d5243528761d0116c6fcc4e297d5e02bb Mon Sep 17 00:00:00 2001 From: Alexei Date: Mon, 6 Jan 2025 17:04:46 -0500 Subject: [PATCH] Fix more current_url unrecoverable exception cases Following up on 5211f67 --- crawler.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crawler.py b/crawler.py index f752858..9fb0c9e 100755 --- a/crawler.py +++ b/crawler.py @@ -1069,11 +1069,14 @@ def crawl(self): self.get_current_url() or domain) except WebDriverException as ex: - self.logger.error("%s on %s: %s", type(ex).__name__, - self.get_current_url() or domain, - ex.msg) if should_restart(ex): + self.logger.error("%s on %s: %s", type(ex).__name__, + domain, ex.msg) self.restart_browser() + else: + self.logger.error("%s on %s: %s", type(ex).__name__, + self.get_current_url() or domain, + ex.msg) num_total = len(domains) if num_total: