mirror of https://github.com/scrapy/scrapy.git
Fix sitemap tag crash in utils/sitemap.py
This commit is contained in:
parent
6ad8a043ca
commit
b8ea9a02af
|
|
@ -99,6 +99,8 @@ class Sitemap:
|
|||
def _get_tag_name(elem: lxml.etree._Element) -> str:
|
||||
if TYPE_CHECKING:
|
||||
assert isinstance(elem.tag, str)
|
||||
if not isinstance(elem.tag, str):
|
||||
return ""
|
||||
_, _, localname = elem.tag.partition("}")
|
||||
return localname or elem.tag
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue