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 1be105cbdf51325b4817177cb34f29860c57ac1a..6f6d33994255504e2ac4903cbe254d623db5fbdc 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 5263dff39003e50a9e6985d6d52abac8a644c1af..ed55ed599099a97fd80cac7795590c42114d6cf2 100644 (file)
@@ -1,2 +1,4 @@
 beautifulsoup4==4.4.1
 requests==2.9.1
+html5lib==0.9999999
+six==1.10.0