home · contact · privacy
Use html5lib for BeautifulSoup parsing.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 16 Feb 2016 23:45:22 +0000 (00:45 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 16 Feb 2016 23:45:22 +0000 (00:45 +0100)
plomlombot.py
requirements.txt

index 1be105c..6f6d339 100755 (executable)
@@ -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:
index 5263dff..ed55ed5 100644 (file)
@@ -1,2 +1,4 @@
 beautifulsoup4==4.4.1
 requests==2.9.1
+html5lib==0.9999999
+six==1.10.0