From: Christian Heller Date: Tue, 16 Feb 2016 23:45:22 +0000 (+0100) Subject: Use html5lib for BeautifulSoup parsing. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/balance?a=commitdiff_plain;h=93ee629ccea3331cda8ed6f0b7072381c92c626c;p=plomlombot-irc.git Use html5lib for BeautifulSoup parsing. --- diff --git a/plomlombot.py b/plomlombot.py index 1be105c..6f6d339 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -322,7 +322,7 @@ def handle_url(url, notice, show_url=False): return if mobile_twitter_hack(url): return - title = bs4.BeautifulSoup(r.text, "html.parser").title + title = bs4.BeautifulSoup(r.text, "html5lib").title if title: prefix = "PAGE TITLE: " if show_url: diff --git a/requirements.txt b/requirements.txt index 5263dff..ed55ed5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ beautifulsoup4==4.4.1 requests==2.9.1 +html5lib==0.9999999 +six==1.10.0