diff --git a/sde_collections/utils/title_resolver.py b/sde_collections/utils/title_resolver.py index 98036e76..b9171de3 100644 --- a/sde_collections/utils/title_resolver.py +++ b/sde_collections/utils/title_resolver.py @@ -70,7 +70,11 @@ def resolve_xpath(xpath: str, url: str) -> str: values = tree.xpath(xpath) if len(values) == 1: - text_content = values[0].text + if isinstance(values[0], str): + text_content = values[0] + else: + text_content = values[0].text + if text_content: text_content = clean_text(text_content) return text_content