diff --git a/rscraping/parsers/html/abe.py b/rscraping/parsers/html/abe.py index 739342e..f1248e5 100644 --- a/rscraping/parsers/html/abe.py +++ b/rscraping/parsers/html/abe.py @@ -37,7 +37,8 @@ def parse_race(self, selector: Selector, *, race_id: str, **_) -> Race | None: t_date = find_date(name) if not t_date: - raise ValueError(f"{self.DATASOURCE}: no date found for {name=}") + logger.error(f"{self.DATASOURCE}: no date found for {name=}") + return None normalized_names = normalize_name_parts(normalize_race_name(name)) if len(normalized_names) == 0: diff --git a/rscraping/parsers/html/act.py b/rscraping/parsers/html/act.py index 9e40b4c..24feaff 100644 --- a/rscraping/parsers/html/act.py +++ b/rscraping/parsers/html/act.py @@ -45,7 +45,8 @@ def parse_race(self, selector: Selector, *, race_id: str, is_female: bool, **_) t_date = find_date(name) if not t_date: - raise ValueError(f"{self.DATASOURCE}: no date found for {name=}") + logger.error(f"{self.DATASOURCE}: no date found for {name=}") + return None gender = GENDER_FEMALE if is_female else GENDER_MALE diff --git a/rscraping/parsers/html/traineras.py b/rscraping/parsers/html/traineras.py index 4a56b26..d04826a 100644 --- a/rscraping/parsers/html/traineras.py +++ b/rscraping/parsers/html/traineras.py @@ -66,7 +66,8 @@ def parse_race(self, selector: Selector, *, race_id: str, table: int | None = No distance = self.get_distance(selector) if not t_date: - raise ValueError(f"{self.DATASOURCE}: no date found for {name=}") + logger.error(f"{self.DATASOURCE}: no date found for {name=}") + return None if not name: logger.error(f"{self.DATASOURCE}: no race found for {race_id=}")