From 49b726aaa9dd20467ee79570d1d50754ff5e65b7 Mon Sep 17 00:00:00 2001 From: Crinibus <57172157+Crinibus@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:18:55 +0100 Subject: [PATCH] Update try except for WebsiteVersionNotSupported to log only error and return non-valid Info --- scraper/domains.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraper/domains.py b/scraper/domains.py index e0a3478d..68fa14bf 100644 --- a/scraper/domains.py +++ b/scraper/domains.py @@ -43,8 +43,8 @@ def get_product_info(self) -> Info: logging.getLogger(__name__).exception(f"Could not get all the data needed from url: {self.url}") return Info(None, None, None, None, valid=False) except WebsiteVersionNotSupported as ex: - logging.getLogger(__name__).exception(ex) - print(ex) + logging.getLogger(__name__).error(ex) + return Info(None, None, None, None, valid=False) def _request_product_data(self) -> None: # option for each specific class to change how the request data is being handled