fix: wrong element object (#9868)

This commit is contained in:
virgosoy 2024-10-25 22:32:41 +08:00 committed by GitHub
parent f7aacefcd6
commit 17cacf258e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,7 +234,7 @@ class WordExtractor(BaseExtractor):
def parse_paragraph(paragraph):
paragraph_content = []
for run in paragraph.runs:
if hasattr(run.element, "tag") and isinstance(element.tag, str) and run.element.tag.endswith("r"):
if hasattr(run.element, "tag") and isinstance(run.element.tag, str) and run.element.tag.endswith("r"):
drawing_elements = run.element.findall(
".//{http://schemas.openxmlformats.org/wordprocessingml/2006/main}drawing"
)