fix: ql-image-mask extra div

This commit is contained in:
xtaodada 2024-05-16 17:26:15 +08:00
parent 25be4747c7
commit ea26dddbde
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -91,6 +91,8 @@ def parse_tag(tag: Union[Tag, PageElement], post_info: PostInfo) -> str:
elif tag.name == "div": elif tag.name == "div":
post_text = [] post_text = []
for tag_ in tag.children: for tag_ in tag.children:
if isinstance(tag_, Tag) and tag_.name == "div" and "ql-image-mask" in tag_["class"]:
continue
if text := parse_tag(tag_, post_info): if text := parse_tag(tag_, post_info):
post_text.append(text) post_text.append(text)
return "\n".join(post_text) return "\n".join(post_text)