Skip to content

Commit 9408109

Browse files
committed
use html5lib instead of html.parser to workaround broken HTML (</br>) issue
1 parent 10d3c64 commit 9408109

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

atwiki/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ def search(self, keyword, is_and=True):
103103

104104
def _request(self, url, data=None):
105105
req = Request(url, headers={'User-Agent': self._user_agent}, data=data)
106-
return BeautifulSoup(urlopen(req).read(), 'html.parser')
106+
return BeautifulSoup(urlopen(req).read(), 'html5lib')

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def _read(filename):
3636
},
3737
install_requires=[
3838
'BeautifulSoup4',
39+
'html5lib',
3940
],
4041
test_suite = 'atwiki.test',
4142
)

0 commit comments

Comments
 (0)