From bbc3219d31e16ca315234bb940953d02d9c94b7a Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 5 Jul 2024 19:15:59 +0200 Subject: [PATCH] Update lubimycztac metadata provider (fixes #3090) --- cps/metadata_provider/lubimyczytac.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cps/metadata_provider/lubimyczytac.py b/cps/metadata_provider/lubimyczytac.py index 0f3081ec..02a96992 100644 --- a/cps/metadata_provider/lubimyczytac.py +++ b/cps/metadata_provider/lubimyczytac.py @@ -285,11 +285,13 @@ class LubimyCzytacParser: def _parse_tags(self) -> List[str]: tags = self._parse_xpath_node(xpath=LubimyCzytac.TAGS, take_first=False) - return [ - strip_accents(w.replace(", itd.", " itd.")) - for w in tags - if isinstance(w, str) - ] + if tags: + return [ + strip_accents(w.replace(", itd.", " itd.")) + for w in tags + if isinstance(w, str) + ] + return None def _parse_from_summary(self, attribute_name: str) -> Optional[str]: value = None