home · contact · privacy
Fix NoneType bug.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 18 Mar 2016 18:58:46 +0000 (19:58 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 18 Mar 2016 18:58:46 +0000 (19:58 +0100)
plomlombot.py

index 6f6d339..75cfe25 100755 (executable)
@@ -323,7 +323,7 @@ def handle_url(url, notice, show_url=False):
     if mobile_twitter_hack(url):
         return
     title = bs4.BeautifulSoup(r.text, "html5lib").title
-    if title:
+    if title and title.string:
         prefix = "PAGE TITLE: "
         if show_url:
             prefix = "PAGE TITLE FOR <" + url + ">: "