diff --git a/merriam_webster.py b/merriam_webster.py index aae87e7e..a2f0a655 100644 --- a/merriam_webster.py +++ b/merriam_webster.py @@ -36,7 +36,7 @@ class MerriamWebsterParser(WordParser): @property def pronounciation(self): prs = [] - for e in self.root.findall(".//*[@class='pr']"): + for e in self.root.findall(".//span[@class='mw no-badge']"): prs.append(ot(e)) return list(set(prs)) @@ -121,9 +121,9 @@ class MerriamWebsterParser(WordParser): "type": self.type, "definitions": self.definitions, "pronounciation": self.pronounciation, - "synonyms": self.synonyms, - "antonyms": self.antonyms, - "synonym_discussion": self.synonym_discussion, + # "synonyms": self.synonyms, + # "antonyms": self.antonyms, + # "synonym_discussion": self.synonym_discussion, "examples": self.examples, "history_and_etymology": self.history_and_etymology, "first_known_use": self.first_known_use, @@ -133,14 +133,14 @@ class MerriamWebsterParser(WordParser): ) -testword = "domicile" -d = MerriamWebsterParser(testword) -# print(d.definitions) -print(d.neighbours) -word_dict = d.todict() -for k, v in word_dict[testword].items(): - print(f"### {k} ###\n", v) -exit() +# testword = "domicile" +# d = MerriamWebsterParser(testword) +# # print(d.definitions) +# print(d.neighbours) +# word_dict = d.todict() +# for k, v in word_dict[testword].items(): +# print(f"### {k} ###\n", v) +# exit() q = Queue(MerriamWebsterParser, "en_MerriamWebster/", "_MW.json") q.loadDB()