Sense now has to parse labellist a bit differently

This commit is contained in:
Ozbolt Menegatti 2019-11-17 21:33:05 +01:00
parent 272fdee3bc
commit b09a84db06

View File

@ -7,7 +7,7 @@ class Sense(Editable):
def __init__(self, sense_xml): def __init__(self, sense_xml):
definition = sense_xml.querySelector("definitionList definition") definition = sense_xml.querySelector("definitionList definition")
self.labels = [label.textContent for label in sense_xml.querySelectorAll("labelList label")] self.labels = [label.textContent for label in sense_xml.querySelectorAll("sense > labelList label")]
self.definition = definition.textContent if definition else "" self.definition = definition.textContent if definition else ""
self.examples = [Example(example_xml) for example_xml in self.examples = [Example(example_xml) for example_xml in