ver Jan26thv3

fixed bug caused by an empty node.text
remove nodes whose name and text are all empty
This commit is contained in:
David Chang
2024-01-26 23:47:46 +08:00
parent b7e3e1f7d0
commit eef5158663
2 changed files with 7 additions and 2 deletions

View File

@@ -40,6 +40,8 @@ def filter_nodes(nodes):
filtered_nodes.append(node)
elif node.tag == 'text':
continue
elif node.get("name") == "" and node.text is None:
continue
else:
coords = tuple(
map(int, node.attrib.get('{uri:deskat:component.at-spi.gnome.org}screencoord').strip('()').split(', ')))