mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 11:50:00 +02:00
🐛 dinglehopper: Do try to get text when no TextEquivs exist
This commit is contained in:
parent
f14ae46870
commit
e4e2777cb7
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,10 @@ class ExtractedText:
|
|||
def get_textequiv_unicode(s):
|
||||
"""Get the TextEquiv/Unicode text of the given PAGE text element"""
|
||||
textequivs = s.findall('./page:TextEquiv', namespaces=nsmap)
|
||||
|
||||
if not textequivs:
|
||||
return None
|
||||
|
||||
def get_index(te):
|
||||
index = te.attrib.get('index')
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue