diff --git a/create_search_index.py b/create_search_index.py index 667b2ad..192d7f1 100755 --- a/create_search_index.py +++ b/create_search_index.py @@ -21,7 +21,7 @@ def walker(path): # Takes html page and outputs json object def parser(page): - soup = BeautifulSoup(open(page, 'r')) + soup = BeautifulSoup(open(page, 'r'), 'html.parser') node = {} try: node['title'] = soup.title.get_text(' ', strip=True).replace(' ', ' ').replace('^', '^') @@ -71,4 +71,4 @@ def sitemaper(nodes): jsoner(nodes) sitemaper(nodes) else: - print 'Error: place this script in hugo site root' + print('Error: place this script in hugo site root') diff --git a/requirements.txt b/requirements.txt index a056a46..eaffdd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -beautifulsoup4==4.3.2 -html5lib==1.0b8 +beautifulsoup4==4.12.3 +html5lib==1.1