From 93ee629ccea3331cda8ed6f0b7072381c92c626c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 17 Feb 2016 00:45:22 +0100 Subject: [PATCH] Use html5lib for BeautifulSoup parsing. --- plomlombot.py | 2 +- requirements.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.30.2