From e6ddfd126c556741ed4db16f01da73942b7dfb74 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 3 Jul 2018 20:41:44 -0700 Subject: [PATCH] Fixed BS html.parser error --- PyDictionary/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyDictionary/core.py b/PyDictionary/core.py index e63d8dc..6b5955d 100644 --- a/PyDictionary/core.py +++ b/PyDictionary/core.py @@ -19,7 +19,7 @@ def __init__(self, *args): except: self.args = args - + def printMeanings(self): dic = self.getMeanings() for key in dic.keys(): @@ -68,7 +68,7 @@ def synonym(term, formatted=False): print("Error: A Term must be only a single word") else: try: - data = _get_soup_object("http://www.thesaurus.com/browse/{0}".format(term)) + data = _get_soup_object("http://www.thesaurus.com/browse/{0}".format(term), "html.parser") terms = data.select("div#filters-0")[0].findAll("li") if len(terms) > 5: terms = terms[:5:]